/** 颜色选择器*/
(function(c) {
	c.fn.jrfColorPicker = function(q) {
		var p = {
			base: this,
			target: this,
			baseattr: "background-color",
			targetattr: "background-color",
			defaultcolor: null,
			col1: ["#ffffff", "#dbdbdb", "#9b9b9b", "#4d4d4d", "#161616", "#000000"],
			col2: ["#cbdeff", "#69a1ff", "#0f67ff", "#0042b3", "#01296e", "#001e4d"],
			col3: ["#c0b6ff", "#6b55ff", "#1f00fc", "#1200a0", "#0a015e", "#08004b"],
			col4: ["#d7b5ff", "#9f56ff", "#7000fc", "#4800a0", "#2b005c", "#210049"],
			col5: ["#f0bfdd", "#e16cb3", "#dd158f", "#9c0061", "#570035", "#410028"],
			col6: ["#ffcfc1", "#ff835f", "#ff3e07", "#ac0000", "#661500", "#501100"],
			col7: ["#ffe9c4", "#ffc265", "#ff9d0b", "#b06900", "#683f00", "#4f2f00"],
			col8: ["#fff6d5", "#fee370", "#ffd119", "#bb9600", "#765d00", "#594601"],
			col9: ["#e2efc3", "#c0e073", "#a4db1d", "#719f00", "#405a00", "#314500"],
			colnormal: ["#c00000", "#ff0000", "#ffc000", "#ffff00", "#94d152", "#00af50", "#01b0f1", "#0172c2", "#012060"],
			historyCookie: JRF.top.$.cookie,
			advance: true,
			showInTop: false,
			onreset: c.noop,
			onchange: c.noop,
			onmousein: c.noop,
			id: this.selector,
			top: 0,
			left: 0
		};
		q = c.extend({},
		p, q);
		if (q.defaultcolor && q.baseattr) {
			q.base.css(q.baseattr, q.defaultcolor)
		}
		if (q.showInTop) {
			q.$$ = JRF.top.$
		} else {
			q.$$ = c
		}
		q.base.bind("click", {
			options: q,
			$$: q.$$
		},
		h)
	};
	function h(q) {
		q.stopPropagation();
		var z = q.data.$$;
		var C = q.data.options;
		z(".jrfColorPicker").remove();
		var A = C.historyCookie("colorpicker_history") ? decodeURIComponent(C.historyCookie("colorpicker_history")).split(",") : [];
		var s = "jrfColorPicker" + Math.floor(Math.random() * 1000);
		var y = '<div class="jrfColorPicker" id="' + s + '"><input type="hidden" id="jrfColorPicker-hidden" /><div class="jrfColorPicker-clearcolor"><div class="original-tite">当前颜色:</div><div class="original-color" style="background-color:transparent;"></div><div class="original-clear" tite="透明色"></div></div>';
		y += '<div class="jrfColorPicker-colorcol">';
		for (var p = 1,
		w; p < 10; p++) {
			w = C["col" + p];
			y += '<div class="col"><div class="col-color first"><div 	style="background-color:' + w[0] + '"></div></div><div class="col-color second"><div style="background-color:' + w[1] + '"></div></div><div class="col-color"><div 		style="background-color:' + w[2] + '"></div></div><div class="col-color"><div 		style="background-color:' + w[3] + '"></div></div><div class="col-color"><div 		style="background-color:' + w[4] + '"></div></div><div class="col-color last"><div 	style="background-color:' + w[5] + '"></div></div></div>'
		}
		y += "</div>";
		y += '<div class="jrfColorPicker-colornormal"><div class="colornormal-tite">标准颜色:</div><div class="colornormal-color">';
		var t = C.colnormal;
		for (var u = 0; u < 9; u++) {
			y += '<div class="col"><div class="col-color normal"><div style="background-color:' + t[u] + '"></div></div></div>'
		}
		y += "</div></div>";
		y += '<div class="jrfColorPicker-colorhistory"><div class="colorhistory-tite">最近使用:</div><div class="colorhistory-color">';
		for (var u = 0,
		v = A.length; u < v; u++) {
			y += '<div class="col"><div class="col-color history"><div style="background-color:' + A[u] + ';"></div></div></div>'
		}
		y += "</div></div>";
		if (C.advance) {
			y += '<div class="jrfColorPicker-coloradvance"><a class="coloradvance-btn" href="javascript:;">更多颜色</a></div>'
		}
		y += "</div>";
		z("body").append(y);
		z(".jrfColorPicker-colorcol>.col").last().addClass("col-last");
		z(".jrfColorPicker-colornormal>.colornormal-color>.col").last().addClass("col-last");
		z(".jrfColorPicker-colorhistory>.colorhistory-color>.col").last().addClass("col-last");
		var x, r;
		if (C.showInTop) {
			if (z(".formDialog").offset()) {
				var B = z(".formDialog:last").offset();
				r = C.left + B.left + C.base.offset().left + C.base.width() / 2;
				x = C.top + B.top + C.base.offset().top + C.base.height() / 2 + 27
			} else {
				r = C.left + C.base.offset().left + C.base.width() / 2;
				x = C.top + C.base.offset().top + C.base.height() / 2
			}
		} else {
			r = C.left + C.base.offset().left + C.base.width() / 2;
			x = C.top + C.base.offset().top + C.base.height() / 2;
			if (c(window).height() - x < 272) {
				x = x - 272
			}
			if (c(window).width() - r < 206) {
				r = r - 206
			}
		}
		z(".jrfColorPicker").css({
			left: r,
			top: x,
			"z-index": 9999
		}).show();
		z(".jrfColorPicker").click(function(D) {
			D.stopPropagation()
		});
		z(".jrfColorPicker").find("#jrfColorPicker-hidden").focus();
		n(C)
	}
	function n(r) {
		var q = r.$$;
		q(".original-color").css("background-color", r.target.css(r.targetattr));
		q(".col-color").unbind("click", m).bind("click", {
			$$: q,
			elm: r.target,
			targetattr: r.targetattr,
			onchange: r.onchange
		},
		m);
		q(".col-color").unbind("mouseenter", g).bind("mouseenter", {
			$$: q,
			elm: r.target,
			targetattr: r.targetattr,
			onmousein: r.onmousein
		},
		g);
		q(".original-clear").unbind("click", b).bind("click", {
			$$: q,
			elm: r.target,
			targetattr: r.targetattr,
			onchange: r.onchange,
			onreset: r.onreset
		},
		b);
		q(".coloradvance-btn").unbind("click", e).bind("click", {
			$$: q,
			elm: r.target,
			targetattr: r.targetattr,
			base: r.base,
			baseattr: r.baseattr,
			onchange: r.onchange
		},
		e);
		q("body").unbind("click", f).bind("click", {
			$$: q,
			elm: r.target,
			targetattr: r.targetattr
		},
		f);
		if (r.showInTop) {
			c("body").unbind("click", f).bind("click", {
				$$: q,
				elm: r.target,
				targetattr: r.targetattr
			},
			f);
			var p = q(".jrfColorPicker");
			p.mouseout(function() {
				p.attr("mouseIn", 0)
			}).mouseover(function() {
				p.attr("mouseIn", 1)
			}).focusout(function() {
				if (p.attr("mouseIn") == 1) {
					p.find("#jrfColorPicker-hidden").focus();
					return
				}
				p.remove()
			})
		}
	}
	function m(r) {
		r.stopPropagation();
		var q = r.data.$$;
		var p = q(this).find("div").css("background-color");
		p = d(p);
		o(p);
		r.data.elm.css(r.data.targetattr, p);
		q(".original-color").css("background-color", p);
		q(".jrfColorPicker").remove();
		r.data.onchange.apply(r.data.elm, [p, a(p)])
	}
	function b(q) {
		q.stopPropagation();
		var p = q.data.$$;
		q.data.elm.css(q.data.targetattr, "transparent");
		p(".original-color").css("background-color", "transparent");
		q.data.onchange.apply(q.data.elm, ["transparent", "transparent"]);
		q.data.onreset.apply(q.data.elm, [this])
	}
	function g(r) {
		var q = r.data.$$;
		var p = c(this).find("div").css("background-color");
		p = d(p);
		q(".original-color").css("background-color", p);
		r.data.onmousein.apply(r.data.elm, [p, a(p)])
	}
	function f(q) {
		var p = q.data.$$;
		p(".jrfColorPicker").remove()
	}
	function e(r) {
		r.stopPropagation();
		var p = r.data.$$;
		p(".jrfColorPicker").remove();
		var q = JRF.popupWindow({
			tite: "高级颜色选项",
			width: 470,
			height: 250,
			divId: "AdvanceJRFColorPicker",
			divContent: '<div class="AdvanceColorPicker"><script type="text/javascript">$(".AdvanceColorPicker").ColorPicker({flat: true , color:"' + d(r.data.elm.css(r.data.targetattr)) + '"});<\/script></div>'
		});
		p("#popupWindow" + q).find(".colorpicker_cancel").unbind("click").bind("click",
		function() {
			JRF.closePopupWindow(q)
		});
		p("#popupWindow" + q).find(".colorpicker_submit").unbind("click").bind("click", {
			base: r.data.base,
			baseattr: r.data.baseattr,
			onchange: r.data.onchange
		},
		function(t) {
			var s = "#" + (p(".colorpicker_hex>input").val());
			t.data.base.css(t.data.baseattr, s);
			t.data.onchange(s, a(s));
			o(s);
			JRF.closePopupWindow(q)
		});
		return false
	}
	function d(p) {
		if (/#/g.test(p)) {
			return p
		}
		p = (p.replace(/[rgba\(\)]/g, "")).split(",");
		var s = ["#"];
		for (var q = 0,
		r; q < 3; q++) {
			r = parseInt(p[q]).toString(16);
			if (r.length === 1) {
				r = "0" + r
			}
			s.push(r)
		}
		return s.join("")
	}
	function a(q) {
		if (/rgb/gi.test(q)) {
			return q
		}
		q = parseInt(q.substring(1), 16);
		var p = ["rgb(", q >> 16, ",", (q & 65280) >> 8, ",", (q & 255), ")"];
		return p.join("")
	}
	function o(q) {
		var t = JRF.top.$.cookie("colorpicker_history");
		var r = t ? decodeURIComponent(t).split(",") : [],
		s = r.join(),
		p = new RegExp(q, "gi");
		if (p.test(s)) {
			return
		}
		if (r.length > 8) {
			r.pop();
			r.unshift(q);
			JRF.top.$.cookie("colorpicker_history", encodeURIComponent(r))
		} else {
			r.unshift(q);
			JRF.top.$.cookie("colorpicker_history", encodeURIComponent(r))
		}
	}
})(jQuery);

try {
    if ($.browser.msie && $.browser.version == "6.0") {
        document.execCommand("BackgroundImageCache", false, true)
    }
} catch(e) {}

if (typeof Jrwap == "undefined") {
	Jrwap = {};
	Jrwap.top = top;
}
/*定义编辑地址*/
/*按钮*/
Jrwap.EDIT_BUTTON_URL="/manage/mobiButton.jsp";
/*图片*/
Jrwap.EDIT_PICTURE_URL="/manage/mobiPicture.jsp";
/*文字*/
Jrwap.EDIT_TEXT_URL="/manage/mobiText.jsp";
/*//文章列表*/
Jrwap.EDIT_NEWS_URL = "/manage/mobiNews.jsp";
/*//图册展示*/
Jrwap.EDIT_PHOTO_URL = "/manage/mobiPhoto.jsp";
/*//图册目录*/
Jrwap.EDIT_PHOTOGROUP_URL = "/manage/mobiPhotoGroup.jsp";
/*//多图列表*/
Jrwap.EDIT_PICTURELIST_URL = "/manage/mobiPictureList.jsp";
/*//多图轮播*/
Jrwap.EDIT_PICTUREFLICKING_URL = "/manage/mobiPictureFlicking.jsp";
/*//产品展示*/
Jrwap.EDIT_PRODUCTSHOW_URL = "/manage/mobiProductShow.jsp";
/*//魔方导航*/
Jrwap.EDIT_CUBENAVIGATION_URL = "/manage/mobiCubeNavigation.jsp";
/*//图册展示*/
Jrwap.EDIT_RICH_URL = "/manage/mobiRich.jsp";
/*//滚动公告*/
Jrwap.EDIT_NOTICE_URL = "/manage/mobiNewsNotice.jsp";
/*//全站搜索*/
Jrwap.EDIT_SEARCH_URL = "/manage/mobiSearch.jsp";
/*//产品搜索*/
Jrwap.EDIT_PRODUCTSEARCH_URL = "/manage/mobiProductSearch.jsp";
/*//优惠券*/
Jrwap.EDIT_COUPON_URL = "/manage/mobiCoupon.jsp";
/*//问卷调查*/
Jrwap.EDIT_FORM_URL = "/manage/mobiForm.jsp";
/*//在线投票*/
Jrwap.EDIT_VOTE_URL = "/manage/mobiVote.jsp";
/*//在线视频*/
Jrwap.EDIT_VIDEO_URL = "/manage/mobiVideo.jsp";
/*//文件下载*/
Jrwap.EDIT_FILEDOWNLOAD_URL = "/manage/mobiFileDownload.jsp";
/*//线条*/
Jrwap.EDIT_LINE_URL = "/manage/mobiLine.jsp";
/*//图标*/
Jrwap.EDIT_ICON_URL = "/manage/mobiIcon.jsp";
/*//模块动画*/
Jrwap.EDIT_MODULEANIMATION_URL = "/manage/mobiModuleAnimationStyle.jsp";
/*//在线地图*/
Jrwap.EDIT_MAP_URL = "/manage/mobiMap.jsp";
/*//问卷调查*/
Jrwap.EDIT_QUESTIONNAIRE_URL = "/manage/mobiQuestionnaire.jsp";
/*//投票*/
Jrwap.EDIT_NEW_VOTE_URL = "/manage/mobiNewVote.jsp";
/*//预约*/
Jrwap.EDIT_RESERVATION_URL = "/manage/mobiReservation.jsp";
/*//留言*/
Jrwap.EDIT_LEAVE_MESSAGE_URL = "/manage/mobiLeaveMessage.jsp";
/*//自定义表单*/
Jrwap.EDIT_CUSTOMIZE_FORM_URL = "/manage/mobiCustomizeForm.jsp";
/*//报名*/
Jrwap.EDIT_APPLY_URL = "/manage/mobiApply.jsp";

/*//浮动模块*/
Jrwap.floatModuleTypeArray = ["picture", "text", "button", "icon", "line"];
/*//内容模块*/
Jrwap.contentListModuleArray = ["news", "productShow"];

/** 请求地址后缀参数*/
Jrwap.getUrlSuffixParameter  = function(){
    return '&extId=0&colId=' + JRF.top._colId+'&ram=' + Math.random();
}

Jrwap.getTopBody = function(){
	var b = JRF.top.document.getElementById("bodyDesign");
	return b;
};

Jrwap.getTopLayer = function(layerId){
	var b = JRF.top.document.getElementById(layerId);
	return b;
}

/** 获取Frame窗口左距离*/
Jrwap.getFrameLeft = function(){
	return $(JRF.top.document.getElementById("mobiReviewPageFrame")).offset().left;
}

Jrwap.getFrameWidth = function(){
	return $(JRF.top.document.getElementById("mobiReviewPageFrame")).width();
}
/** 获取手机窗口距离顶部高度*/
Jrwap.getFrameTop = function(){
	return $(JRF.top.document.getElementById("mobiReviewPageFrame")).offset().top;
}

Jrwap.getPreviewWindow = function() {
    var b = JRF.top.document.getElementById("mobiReviewPageFrame");
    var a = !b ? window: b.contentWindow;
    return a;
};
Jrwap.getPreviewDocument = function() {
    var a = Jrwap.getPreviewWindow().document;
    return a;
};
Jrwap.getPreviewObject = function(a) {
    if (!a) {
        return
    }
    return Jrwap.getPreviewDocument().getElementById(a);
};
Jrwap.getPreviewObjectClass = function(a) {
    if (!a) {
        return
    }
    return Jrwap.getPreviewDocument().getElementsByClassName(a);
};
Jrwap.getJQMobi = function() {
    var b = Jrwap.getPreviewWindow(),
    a = b.jm;
    return a;
};
Jrwap.createElementByHtml = function(a) {
    var b = document.createElement("div");
    b.innerHTML = a;
    b = b.firstChild;
    b.parentNode.removeChild(b);
    return b;
};
Jrwap.isNull = function(a) {
    return (typeof a == "undefined") || (a == null)
};
Jrwap.isDate = function(a) {
    if (a.constructor == Date) {
        return true
    } else {
        return false
    }
};
Jrwap.isNumber = function(a) {
    if (/[^\d]/.test(a)) {
        return false
    } else {
        return true
    }
};
Jrwap.isFloat = function(a) {
    return /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(a)
};
Jrwap.isInteger = function(a) {
    return /^-?\d+$/.test(a)
};
Jrwap.isLowerCase = function(a) {
    return /^[a-z]+$/.test(a)
};
Jrwap.isUpperCase = function(a) {
    return /^[A-Z]+$/.test(a)
    
};
Jrwap.toLowerCaseFirstOne = function(a) {
    if (typeof a === "undefined" || Jrwap.isLowerCase(a.charAt(0))) {
        return a
    } else {
        var c = a.substring(0, 1).toLowerCase();
        var b = a.substring(1, a.length);
        return c + b
    }
};
Jrwap.toUpperCaseFirstOne = function(a) {
    if (typeof a === "undefined" || Jrwap.isUpperCase(a.charAt(0))) {
        return a
    } else {
        var c = a.substring(0, 1).toUpperCase();
        var b = a.substring(1, a.length);
        return c + b
    }
};
Jrwap.isDigit = function(a) {
    if (a < "0" || a > "9") {
        return false
    }
    return true
};
Jrwap.isLetter = function(a) {
    if ((a < "a" || a > "z") && (a < "A" || a > "Z")) {
        return false
    }
    return true
};
Jrwap.isChinese = function(a) {
    if (a < "一" || a > "龥") {
        return false
    }
    return true
};
Jrwap.isIp = function(c) {
    if (typeof c != "string" || $.trim(c) == "") {
        return false
    }
    var b = c.split(".");
    if (b.length != 4) {
        return false
    }
    var a = true;
    $.each(b,
    function(d, f) {
        if (!Jrwap.isNumber(f) || parseInt(f) < 0 || parseInt(f) > 255) {
            a = false;
            return true
        }
    });
    return a
};
Jrwap.isDomain = function(a) {
    if (/^[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]$/.test(a)) {
        if (a.indexOf("--") >= 0) {
            return false
        }
        return true
    } else {
        return false
    }
};
Jrwap.isWord = function(b) {
    var a = /^[a-zA-Z0-9_]+$/;
    return a.test(b)
};
Jrwap.isEmail = function(a) {
    var b = /^[a-zA-Z0-9_\&\-\.\+]+@[a-zA-Z0-9][a-zA-Z0-9_\-]*\.[a-zA-Z0-9\-][a-zA-Z0-9_\-\.]*[a-zA-Z0-9 ]$/;
    return b.test(a)
};
Jrwap.isEmailDomain = function(a) {
    var b = /^[a-zA-Z0-9][a-zA-Z0-9_\-]*\.[a-zA-Z0-9\-][a-zA-Z0-9_\-\.]*[a-zA-Z0-9]$/;
    return b.test(a)
};
Jrwap.isMobile = function(a) {
    var b = /^1\d{10}$/;
    return b.test(a)
};
Jrwap.isPhone = function(a) {
    var c = /^([^\d])+([^\d])*([^\d])$/;
    var b = /^([\d\+\s\(\)-])+([\d\+\s\(\)-])*([\d\+\s\(\)-])$/;
    if (c.test(a)) {
        return false
    }
    return b.test(a)
};
Jrwap.isUrl = function(d, c) {
    if (typeof c == "undefined") {
        c = true
    }
    if (c && d.length >= 1 && d.charAt(0) == "/") {
        return true
    }
    if (c && d.length >= 1 && d.charAt(0) == "#") {
        return true
    }
    var b = /^(\w+:).+/;
    var a = b.test(d);
    return a
};

Jrwap.checkBit = function(i, b) {
    var f = true;
    if (i > 2147483647 || i < 0 || b > 2147483647 || b < 0) {
        f = false
    }
    if (f) {
        return (i & b) == b
    }
    var g = i.toString(2);
    var d = b.toString(2);
    if (g.length > 62 || d.length > 62) {
    	$.alert("Does not support more than 62 bit. flagBinary.length=" + g.length + ",bitFlagBinary.length" + d.length + ".");
        return false
    }
    var h = flagLow = bitFlagHight = bitFlagLow = 0;
    if (g.length > 31) {
        var c = g.slice(0, g.length - 31);
        var a = g.slice(g.length - 31);
        h = parseInt(c, "2");
        flagLow = parseInt(a, "2")
    } else {
        flagLow = parseInt(g.slice(0, g.length), "2")
    }
    if (d.length > 31) {
        var c = d.slice(0, d.length - 31);
        var a = d.slice(d.length - 31);
        bitFlagHight = parseInt(c, "2");
        bitFlagLow = parseInt(a, "2")
    } else {
        bitFlagLow = parseInt(d.slice(0, d.length), "2")
    }
    var j = (flagLow & bitFlagLow) == bitFlagLow;
    if (j) {
        j = (h & bitFlagHight) == bitFlagHight
    }
    return j
};
Jrwap.isIE = function() {
    return $.browser.msie ? true: false
};
Jrwap.isIE6 = function() {
    if ($.browser.msie) {
        if ($.browser.version == "6.0") {
            return true
        }
    }
    return false
};
Jrwap.isIE7 = function() {
    if ($.browser.msie) {
        if ($.browser.version == "7.0") {
            return true
        }
    }
    return false
};
Jrwap.isIE8 = function() {
    if ($.browser.msie) {
        if ($.browser.version == "8.0") {
            return true
        }
    }
    return false
};
Jrwap.isIE9 = function() {
    if ($.browser.msie) {
        if ($.browser.version == "9.0") {
            return true
        }
    }
    return false
};
Jrwap.isIE10 = function() {
    if ($.browser.msie) {
        if ($.browser.version == "10.0") {
            return true
        }
    }
    return false
};
Jrwap.isIE11 = function() {
    if ($.browser.msie) {
        if ($.browser.version == "11.0" || $.browser.rv) {
            return true
        }
    }
    return false
};
Jrwap.isSafari = function() {
    return $.browser.safari ? true: false
};
Jrwap.isWebkit = function() {
    return $.browser.webkit ? true: false
};
Jrwap.isChrome = function() {
    return $.browser.chrome ? true: false
};
Jrwap.isMozilla = function() {
    return $.browser.mozilla ? true: false
};
Jrwap.isAppleWebKit = function() {
    var a = window.navigator.userAgent;
    if (a.indexOf("AppleWebKit") >= 0) {
        return true
    }
    return false
};
Jrwap.isOpera = function() {
    return $.browser.opera || $.browser.opr ? true: false
};
Jrwap.isAndroid = function() {
    return $.browser.android ? true: false
};
Jrwap.isIpad = function() {
    return $.browser.ipad ? true: false
};
Jrwap.isIphone = function() {
    return $.browser.iphone ? true: false
};
Jrwap.BrowserType = {
    UNKNOWN: 0,
    SPIDER: 1,
    CHROME: 2,
    FIREFOX: 3,
    MSIE8: 4,
    MSIE7: 5,
    MSIE6: 6,
    MSIE9: 7,
    SAFARI: 8,
    MSIE10: 9,
    MSIE11: 10,
    OPERA: 11,
    APPLE_WEBKIT: 12
};
Jrwap.getBrowserType = function() {
    if (Jrwap.isIE6()) {
        return Jrwap.BrowserType.MSIE6
    } else {
        if (Jrwap.isIE7()) {
            return Jrwap.BrowserType.MSIE7
        } else {
            if (Jrwap.isIE8()) {
                return Jrwap.BrowserType.MSIE8
            } else {
                if (Jrwap.isIE9()) {
                    return Jrwap.BrowserType.MSIE9
                } else {
                    if (Jrwap.isIE10()) {
                        return Jrwap.BrowserType.MSIE10
                    } else {
                        if (Jrwap.isIE11()) {
                            return Jrwap.BrowserType.MSIE11
                        } else {
                            if (Jrwap.isMozilla()) {
                                return Jrwap.BrowserType.FIREFOX
                            } else {
                                if (Jrwap.isOpera()) {
                                    return Jrwap.BrowserType.OPERA
                                } else {
                                    if (Jrwap.isChrome()) {
                                        return Jrwap.BrowserType.CHROME
                                    } else {
                                        if (Jrwap.isSafari()) {
                                            return Jrwap.BrowserType.SAFARI
                                        } else {
                                            if (Jrwap.isAppleWebKit()) {
                                                return Jrwap.BrowserType.APPLE_WEBKIT
                                            } else {
                                                return Jrwap.BrowserType.UNKNOWN
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
};
Jrwap.Screen = function() {
    return {
        width: window.screen.width,
        height: window.screen.height
    }
};
Jrwap.ScreenType = {
    OTHER: 0,
    W1920H1080: 1,
    W1680H1050: 2,
    W1600H1200: 3,
    W1600H1024: 4,
    W1600H900: 5,
    W1440H900: 6,
    W1366H768: 7,
    W1360H768: 8,
    W1280H1024: 9,
    W1280H960: 10,
    W1280H800: 11,
    W1280H768: 12,
    W1280H720: 13,
    W1280H600: 14,
    W1152H864: 15,
    W1024H768: 16,
    W800H600: 17
};
Jrwap.getScreenType = function(b, a) {
    if (b == 1920 && a == 1080) {
        return Jrwap.ScreenType.W1920H1080
    } else {
        if (b == 1680 && a == 1050) {
            return Jrwap.ScreenType.W1680H1050
        } else {
            if (b == 1600 && a == 1200) {
                return Jrwap.ScreenType.W1600H1200
            } else {
                if (b == 1600 && a == 1024) {
                    return Jrwap.ScreenType.W1600H1024
                } else {
                    if (b == 1600 && a == 900) {
                        return Jrwap.ScreenType.W1600H900
                    } else {
                        if (b == 1440 && a == 900) {
                            return Jrwap.ScreenType.W1440H900
                        } else {
                            if (b == 1366 && a == 768) {
                                return Jrwap.ScreenType.W1366H768
                            } else {
                                if (b == 1360 && a == 768) {
                                    return Jrwap.ScreenType.W1360H768
                                } else {
                                    if (b == 1280 && a == 1024) {
                                        return Jrwap.ScreenType.W1280H1024
                                    } else {
                                        if (b == 1280 && a == 960) {
                                            return Jrwap.ScreenType.W1280H960
                                        } else {
                                            if (b == 1280 && a == 800) {
                                                return Jrwap.ScreenType.W1280H800
                                            } else {
                                                if (b == 1280 && a == 768) {
                                                    return Jrwap.ScreenType.W1280H768
                                                } else {
                                                    if (b == 1280 && a == 720) {
                                                        return Jrwap.ScreenType.W1280H720
                                                    } else {
                                                        if (b == 1280 && a == 600) {
                                                            return Jrwap.ScreenType.W1280H600
                                                        } else {
                                                            if (b == 1152 && a == 864) {
                                                                return Jrwap.ScreenType.W1152H864
                                                            } else {
                                                                if (b == 1024 && a == 768) {
                                                                    return Jrwap.ScreenType.W1024H768
                                                                } else {
                                                                    if (b == 800 && a == 600) {
                                                                        return Jrwap.ScreenType.W800H600
                                                                    } else {
                                                                        return Jrwap.ScreenType.OTHER
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
};
Jrwap.getCssInt = function(c, b) {
    if (c.css(b)) {
        var a = parseInt(c.css(b).replace("px", ""));
        if (isNaN(a)) {
            return 0
        }
        return a
    } else {
        return 0
    }
};
Jrwap.getEventX = function(a) {
    a = a || window.event;
    return a.pageX || a.clientX + document.body.scrollLeft
};
Jrwap.getEventY = function(a) {
    a = a || window.event;
    return a.pageY || a.clientY + document.body.scrollTop
};
Jrwap.inRect = function(a, b) {
    if (a.x > b.left && a.x < (b.left + b.width) && a.y > b.top && a.y < (b.top + b.height)) {
        return true
    }
    return false
};
Jrwap.addUrlParams = function(a, b) {
    if (Jrwap.isNull(b)) {
        return a
    }
    if (a.indexOf("?") < 0) {
        return a + "?" + b
    }
    return a + "&" + b
};
Jrwap.addArrElementsNoRepeat = function(a, c) {
    if (a.length > 0) {
        var b = 0;
        $.each(a,
        function(d, f) {
            if (a[d] == c) {
                b++
            }
        });
        if (b == 0) {
            a[a.length] = c
        }
    } else {
        a[a.length] = c
    }
    return a
};
Jrwap.getUrlRoot = function(a) {
    var b = a.indexOf("://");
    if (b < 0) {
        return a
    }
    b = a.indexOf("/", b + 3);
    if (b < 0) {
        return "/"
    }
    return a.substring(b)
};
Jrwap.getUrlParam = function(b, a) {
    var d = b.substring(b.indexOf("?") + 1, b.length).split("&");
    var c;
    $.each(d,
    function(f, h) {
        var g = decodeURIComponent(h.substring(0, h.indexOf("=")));
        if (g === a) {
            c = decodeURIComponent(h.substring(h.indexOf("=") + 1, h.length));
            return false
        }
    });
    return c
};
Jrwap.encodeHtml = function(a) {
    return a && a.replace ? (a.replace(/&/g, "&amp;").replace(/ /g, "&nbsp;").replace(/\b&nbsp;+/g, " ").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\\/g, "&#92;").replace(/\'/g, "&#39;").replace(/\"/g, "&quot;").replace(/\n/g, "<br/>").replace(/\r/g, "")) : a
};
Jrwap.decodeHtml = function(a) {
    return a && a.replace ? (a.replace(/&nbsp;/gi, " ").replace(/&lt;/gi, "<").replace(/&gt;/g, ">").replace(/&#92;/gi, "\\").replace(/&#39;/gi, "'").replace(/&quot;/gi, '"').replace(/\<br\/\>/gi, "\n").replace(/&amp;/gi, "&")) : a
};
Jrwap.encodeHtmlJs = function(a) {
    return a && a.replace ? (a.replace(/\\/g, "\\\\").replace(/\'/g, "\\x27").replace(/\"/g, "\\x22").replace(/\n/g, "\\n").replace(/</g, "\\x3c").replace(/>/g, "\\x3e")) : a
};
Jrwap.encodeHtmlAttr = function(a) {
    return a && a.replace ? (a.replace(/\"/g, "&#x22;").replace(/\'/g, "&#x27;").replace(/</g, "&#x3c;").replace(/>/g, "&#x3e;").replace(/&/g, "&#x26;")).replace(/\\/g, "&#5c;") : a
};
Jrwap.encodeUrl = function(a) {
    return typeof a === "undefined" ? "": encodeURIComponent(a)
};

Jrwap.decodeUrl = function(a) {
    return typeof a === "undefined" ? "": decodeURIComponent(a)
};
Jrwap.addInterval = function(d, c, a) {
    if (Jrwap.isNull(Jrwap.intervalFunc)) {
        Jrwap.intervalFunc = new Array()
    }
    for (var b = 0; b < Jrwap.intervalFunc.length; ++b) {
        if (Jrwap.intervalFunc[b].id == d) {
            Jrwap.intervalFunc.splice(b, 1);
            break;
        }
    }
    Jrwap.intervalFunc.push({
        id: d,
        func: c,
        interval: a,
        type: 1
    })
};
Jrwap.startInterval = function(c) {
    if (Jrwap.isNull(Jrwap.intervalFunc)) {
        return
    }
    for (var b = 0; b < Jrwap.intervalFunc.length; ++b) {
        var a = Jrwap.intervalFunc[b];
        if (c == null || a.id == c) {
            if (a.timer) {
                clearInterval(a.timer)
            }
            if (a.type == 1) {
                a.timer = setInterval(a.func, a.interval)
            } else {
                a.timer = setTimeout(a.func, a.interval)
            }
        }
    }
};
Jrwap.ing = function(i, h) {
    var e = (i == null || i == "") ? "正在处理...": i;
    var d = JRF.top.document.body.clientWidth;
    var a = JRF.top.document.body.clientHeight;
    var f = "";
    f = "<div id='mobiIng' class='mobiIng'></div>";
    if (jQuery("#mobiIng").length == 0) {
        jQuery(f).appendTo("body")
    }
    var b = jQuery("#mobiIng");
    var c = parseInt(Math.random() * 10000);
    var g = '<div id="' + c + '" class="mobiTips"><div id="mobiMsg' + c + '" class="mobiMsg">' + e + "</div></div>";
    b.find(".mobiTips").remove();
    jQuery(g).appendTo(b);
    window.setTimeout(function() {
        b.css("visibility", "hidden");
        b.css("opacity", "0")
    },
    2500);
    window.setTimeout(function() {
        jQuery("#" + c).remove();
        b.css("visibility", "visible");
        b.css("opacity", "1")
    },
    3000)
};


Jrwap.getFrame = function (o) {
    var a = JRF.top.document.getElementById(o);
    return a
};

Jrwap.getFrameByClass = function (o) {
    var a = JRF.top.document.getElementsByClassName(o);
    return a;
};
Jrwap.getFrameWindow = function (o) {
    var a = JRF.top.document.getElementById(o);
    var w = !a ? window : a.contentWindow;
    return w
};
Jrwap.getFrameDocument = function (o) {
    var a = JRF.top.document.getElementById(o);
    return a.contentDocument || a.contentWindow.document
};
Jrwap.getModuleWindow = function (c) {
    var a = JRF.top.document.getElementById("mobiModuleFrame");
    var b = !a ? window : a.contentWindow;
    return b
};
Jrwap.getModuleObject = function (a) {
    if (!a) {
        return
    }
    return Jrwap.getModuleWindow().document.getElementById(a)
};
Jrwap.getTemplateWindow = function () {
    var a = JRF.top.document.getElementById("mobiTemplateFrame");
    var b = !a ? window : a.contentWindow;
    return b
};
Jrwap.getTemplateObject = function (a) {
    if (!a) {
        return
    }
    return Jrwap.getTemplateWindow().document.getElementById(a)
};
Jrwap.getTemplateDocument = function () {
    var a = Jrwap.getTemplateWindow().document;
    return a
};
Jrwap.getBannerWindow = function () {
    var b = JRF.top.document.getElementById("mobiBannerFrame");
    var a = !b ? window : b.contentWindow;
    return a
};
Jrwap.getStyleWindow = function() {
    var a = JRF.top.document.getElementById("mobiStyleFrame");
    var b = !a ? window: a.contentWindow;
    return b
};
Jrwap.getStyleDocument = function() {
    var a = Jrwap.getStyleWindow().document;
    return a
};
Jrwap.getBannerWindow = function() {
    var b = JRF.top.document.getElementById("mobiBannerFrame");
    var a = !b ? window: b.contentWindow;
    return a
};
Jrwap.getBannerObject = function (a) {
    if (!a) {
        return
    }
    return Jrwap.getBannerWindow().document.getElementById(a)
};
Jrwap.getSettingWindow = function () {
    var b = JRF.top.document.getElementById("mobiSettingFrame");
    var a = !b ? window : b.contentWindow;
    return a
};
Jrwap.getSettingObject = function (a) {
    if (!a) {
        return
    }
    return Jrwap.getSettingWindow().document.getElementById(a)
};
Jrwap.getColumnWindow = function () {
    var a = JRF.top.document.getElementById("mobiColumnFrame");
    var b = !a ? window : a.contentWindow;
    return b
};
Jrwap.getColumnObject = function (a) {
    if (!a) {
        return
    }
    return Jrwap.getColumnWindow().document.getElementById(a)
};



/**计算页面高度并赋值 嵌入页面调用*/
Jrwap.AllShowTopForBottom = function () {
    /*//先判断是嵌入页面*/
    if (Jrwap.isTopWindow()) {
    	/*//正常加载时调用*/
        Jrwap.isShowTopForBottom();
    } else {
        /*//判断页面内容是否超出   动态显示top*/
        var phoneHeight = 0;
        if ($(Jrwap.getPreviewWindow('mobiReviewPageFrame')).length > 0) {
            phoneHeight = $(Jrwap.getPreviewWindow('mobiReviewPageFrame')).height();
            var obj = Jrwap.getPreviewWindow();
            var headerHeight = 0;
            if ($(obj.document.getElementById('web_header')).is(":visible")) {
                headerHeight = $(obj.document.getElementById('web_header')).height();
            }
            var webnavHeight = 0;
            if ($(obj.document.getElementById('webnav')).is(":visible")) {
                webnavHeight = $(obj.document.getElementById('webnav')).height();
            }
            var bannerHeight = 155;
            if ($(obj.document.getElementById('web_banner')).is(":visible")) {
                bannerHeight = $(obj.document.getElementById('web_banner')).height();
            }else{
                bannerHeight = 0;
            }
            /*//文章内容高度*/
            var webContentHeight = 0;
            if(obj.document.getElementById('web_content')&&$(obj.document.getElementById('web_content')).is(":visible")){
                webContentHeight = $(obj.document.getElementById('web_content')).height();
            }
            /*//问卷内容高度*/
            var webSurveyHeight = 0;
            if(obj.document.getElementById('survey_content')&&$(obj.document.getElementById('survey_content')).is(":visible")){
                webSurveyHeight = $(obj.document.getElementById('survey_content')).height();
            }
            /*//产品内容高度*/
            var webProductHeight = 0;
            if(obj.document.getElementById('product_content')&&$(obj.document.getElementById('product_content')).is(":visible")){
                webProductHeight = $(obj.document.getElementById('product_content')).height();
            }
            /*//图册内容高度*/
            var webPhotoboxConentHeight = 0;
            if(obj.document.getElementById('web_photobox_conent')&&$(obj.document.getElementById('web_photobox_conent')).is(":visible")){
                webPhotoboxConentHeight = $(obj.document.getElementById('web_photobox_conent')).height();
            }
            var productSearchHeight = 0;
            if(obj.document.getElementById('web_product_search')&&$(obj.document.getElementById('web_product_search')).is(":visible")){
                productSearchHeight = $(obj.document.getElementById('web_product_search')).height();
                if(productSearchHeight<195){
                    productSearchHeight = 195;
                    $(obj.document.getElementById('web_product_search')).height(195);
                }else{
                    $(obj.document.getElementById('web_product_search')).css('height', 'auto');
                }
            }
            var contentTagHeight = 0;
            if(obj.document.getElementById('web_content_tag')&&$(obj.document.getElementById('web_content_tag')).is(":visible")){
                contentTagHeight = $(obj.document.getElementById('web_content_tag')).height();
                if(contentTagHeight<195){
                    contentTagHeight = 195;
                    $(obj.document.getElementById('web_content_tag')).height(195);
                }else{
                    $(obj.document.getElementById('web_content_tag')).css('height', 'auto');
                }
            }
            var contentSearchHeight = 0;
            if(obj.document.getElementById('web_content_search')&&$(obj.document.getElementById('web_content_search')).is(":visible")){
                contentSearchHeight = $(obj.document.getElementById('web_content_search')).height();
                if(contentSearchHeight<195){
                    contentSearchHeight = 195;
                    $(obj.document.getElementById('web_content_search')).height(195);
                }else{
                    $(obj.document.getElementById('web_content_search')).css('height', 'auto');
                }
            }
            var containerHeight = 115;
            if ($(obj.document.getElementById('web_main_content')).is(":visible")) {
                if($(obj.document.getElementById('web_main_content')).children().length>0){
                    $(obj.document.getElementById('web_main_content')).css('height', 'auto');
                }else{
                    containerHeight = 0;
                }
                /*containerHeight = $(obj.document.getElementById('web_main_content')).height();
                 if(containerHeight<195){
                 containerHeight = 295;
                 $(obj.document.getElementById('web_main_content')).height(295);
                 }else{

                 }*/
            }else{
                containerHeight = 0;
            }
            var footerHeight = 0;
            if ($(obj.document.getElementById('web_footer')).is(":visible")) {
                footerHeight = $(obj.document.getElementById('web_footer')).height();
            }
            var dataHeight = headerHeight + webnavHeight + bannerHeight + webContentHeight + webSurveyHeight + webProductHeight +webPhotoboxConentHeight + productSearchHeight + contentTagHeight + contentSearchHeight + containerHeight + footerHeight;
            $(obj.document.getElementById('web_background')).height(dataHeight);
            if (phoneHeight < dataHeight) {
                $(obj.document.getElementById('return_top')).show();
                $(obj.document.getElementById('web_footer')).find(".return_top").css("display", "block");
                /*//$(obj.document.getElementById('web_footer')).removeAttr('style');
                //$(Jrwap.getPreviewWindow('mobiReviewPageFrame').document).find("html").attr('style', 'font-size: 20.125px;');
                //$(Jrwap.getPreviewWindow('mobiReviewPageFrame').document).find("body").removeAttr('style');
                //$(Jrwap.getPreviewWindow('mobiReviewPageFrame').document).find("html").css('overflow-y', 'auto');
                // $(Jrwap.getPreviewWindow('mobiReviewPageFrame').document).find("body").css('overflow-y', 'auto');*/
            } else {
                $(obj.document.getElementById('web_footer')).find(".return_top").css("display", "none");
                $(obj.document.getElementById('return_top')).hide();
                /*//$(obj.document.getElementById('web_footer')).attr('style', 'width: 100%;');
                //$(Jrwap.getPreviewWindow('mobiReviewPageFrame').document).find("html").css('overflow-y', 'hidden');
                //$(Jrwap.getPreviewWindow('mobiReviewPageFrame').document).find("body").css('overflow-y', 'hidden');*/
            }
        }

    }
}
Jrwap.setColHiddenList = function (b) {
    for (var a = 0; a < JRF.top._columnModuleHiddenList.length; ++a) {
        if (JRF.top._columnModuleHiddenList[a] == b) {
            JRF.top._columnModuleHiddenList.splice(a, 1);
            break
        }
    }
};
/** 获取同级模块*/
Jrwap.getModulePosBottomSibling = function (a) {
    var b = a.nextAll(".form").first();
    if (b.length == 0) {
        return null
    }
    return b
};
Jrwap.getLayoutItemStatus = function (a) {
};

Jrwap.genAjaxUrl = function (b) {
    var a = "";
    if (Jrwap.getPreviewDocument().location.pathname.indexOf("/manage/") >= 0) {
        a = "../ajax/"
    } else {
        a = "ajax/"
    }
    return a + b
};
Jrwap.jumpUrlJrwap = function (a) {
    if (a != "") {
        a = a.replace(/#.*/, "");
        if (Jrwap.getPreviewDocument().location.href == a) {
            Jrwap.getPreviewDocument().location.reload()
        } else {
            Jrwap.getPreviewDocument().location.href = a
        }
    }
};
Jrwap.getSiteMultiLanguageUrl = function () {
    var a = JRF.top.location.href,
        b = a.split("/")[3];
    if (b !== "manage") {
        return JRF.top._siteDomain + "/" + b
    }
    return JRF.top._siteDomain + ""
};

Jrwap.getLocatorFlag = function() {
    var a = JRF.top.location.href,
    b = a.split("/")[3];
    if (b !== "manage") {
        return "/" + b
    }
    return ""
};


Jrwap.manageCreateSlideBar = function (e) {
    if (!e) {
        return
    }
    var g = e.baseClass,
        f = e.parentId,
        a = e.slideParentId,
        i = e.property,
        j = "",
        d = ""
        callback = e.callback;
    if (!f) {
        return
    }
    var c;
    for (var h in i) {
        if (parseInt(h) === 0) {
            c = i[h].id
        }
        if (i[h].id === "wxReplay") {
            d += '<div class="wxFunction">';
            d += '<div class="wxFunctionBox"><div class="wxFunctionImg"></div><div class="wxFunctionFont">功能</div></div>';
            d += '<div  class="' + g + '" _pos="' + h + '" id="' + i[h].id + '">' + i[h].text + "</div>"
        } else {
            if (i[h].id === "materialManage") {
                d += '</div><div class="wxLine"></div><div class="wxManage">';
                d += '<div class="wxManageBox"><div class="wxManageImg"></div><div class="wxManageFont">管理</div></div>';
                d += '<div  class="' + g + '" _pos="' + h + '" id="' + i[h].id + '">' + i[h].text + "</div>"
            } else {
                if (i[h].id === "wxSetting") {
                    if (i.length !== 1) {
                        d += '</div><div class="wxLine"></div><div class="wxPublicSetting">';
                        d += '<div class="wxPublicSettingBox"><div class="wxSettingImg"></div><div class="wxSettingFont">设置</div></div>';
                        d += '<div  class="' + g + '" _pos="' + h + '" id="' + i[h].id + '">' + i[h].text + "</div>";
                        d += "</div>"
                    } else {
                        d += '<div class="wxPublicSetting">';
                        d += '<div class="wxPublicSettingBox"><div class="wxSettingImg"></div><div class="wxSettingFont">设置</div></div>';
                        d += '<div  class="' + g + '" _pos="' + h + '" id="' + i[h].id + '">' + i[h].text + "</div>";
                        d += "</div>"
                    }
                } else {
                    d += '<div  class="' + g + '" _pos="' + h + '" id="' + i[h].id + '">' + i[h].text + "</div>"
                }
            }
        }
    }
    if (f === "wxSlide") {
        d += '<div class="slideBar"><div class="wxSlideBarTip transitionPanel" style="left: 130px;"></div></div>'
    } else {
        if (f !== "wxColumnSlider") {
            d += '<div class="slideBar"><div class="slideBarTip transitionPanel"></div></div>'
        }
    }
    $("#" + j + "Panel").show(100);
    a && Jrwap.cutMobiTab(a, "choicePanel", 0);
    $("#" + f).append(d).click(function (event) {
        k(event);
    });
    c && b(document.getElementById(c));
    function k(p) {
        var s = $.browser.msie ? p.srcElement && p.srcElement.id : p.target && p.target.id,
            o = 0;
        if (s == "") {
            s = p.target.parentNode.id;
        }
        for (var l in i) {
            if (s === i[l].id) {
                $(".mobiTemColumn").removeClass("mobiTabCurrent");
                var n = $("#" + s);
                if (!n.hasClass("mobiModColumn")) {
                    JRF.top._mobiTabInit.initChild = parseInt(n.attr("_pos"))
                }
                if (n.find(".mobiTabCurrent").size() !== 0) {
                    return
                }
                n.addClass("mobiTabCurrent");
                if (i[l].callback) {
                    new Function(i[l].callback)();
                }
                if (i[l].iframe) {
                    var r = i[l].iframe[0].iframeId,
                        q = i[l].iframe[0].iframeCallbackFun,
                        t = i[l].iframe[0].iframeUrl;
                    var m = document.getElementById(r).contentWindow;
                    if (!$("#" + r).attr("src")) {
                        $("#" + r).attr("src", t);
                        $("#" + r).load(function () {
                            if (q) {
                                m[q]()
                            }
                        })
                    } else {
                        if (q) {
                            m[q]();
                        }
                    }
                }
                a && Jrwap.cutMobiTab(a, "choicePanel", o);
                b(p.target)
            }
            o++;
        }
    }

    function b(m) {
        var l = m.offsetLeft;
        if ($("#" + f + " .wxSlideBarTip").length > 0) {
            l = l + $(m).outerWidth() / 2 - $("#" + f + " .wxSlideBarTip").width() / 2;
            $("#" + f + " .wxSlideBarTip").css("left", l + "px");
            $(m).addClass("mobiTabCurrent")
        } else {
            l = l + $(m).outerWidth() / 2 - $("#" + f + " .slideBarTip").width() / 2;
            $("#" + f + " .slideBarTip").css("left", l + "px");
            $(m).addClass("mobiTabCurrent")
        }
    }

    if (callback && (typeof callback === "function")){
        callback();
    }
};

Jrwap.cutMobiTab = function (a, e, c) {
    var d = $("#" + a),
        b = $("#" + a + " >." + e);
    b.removeClass("activeTab");
    $(b[c]).addClass("activeTab");
    $.cookie("_mobiTabInit", JSON.stringify(JRF.top._mobiTabInit))
};

Jrwap.fixUrl = function (a, b) {
	//JRF.top._visitorHostName 访问地址
    if (!a || !b) {
        return
    }
    b = JRF.fixUrl(b);
    var i = a.indexOf(JRF.top._visitorHostName) 
    if(i>-1){
    	return a;
    }else{
    	return b+"/"+a;
    }
};
Jrwap.initModulePhotoSwipe = function (e) {
    var b = document.querySelectorAll("#" + e + " img");
    if (b.length < 1) {
        return
    }
    var d = {
            imageScaleMethod: "fitNoUpscale",
            getImageCaption: function (f, g) {
                var i, h;
                i = f + "/" + g;
                h = document.createElement("div");
                h.appendChild(document.createTextNode(i));
                return h
            },
            getToolbar: function () {
                return '<div class="ps-toolbar-close"><div class="ps-toolbar-content"></div></div><div class="ps-toolbar-previous"><div class="ps-toolbar-content"></div></div><div class="ps-toolbar-next"><div class="ps-toolbar-content"></div></div>'
            }
        },
        c = window.Code.PhotoSwipe,
        a = c.attach(b, d)
};

Jrwap.isTopWindow = function () {
    if (window === window.top) {
        return true;
    }
    return false;
}
/**计算页面高度并赋值 嵌入页面调用*/
Jrwap.isShowTopForBottom = function () {
    /*//判断页面内容是否超出   动态显示top*/
    var phoneHeight = 0;
    if ($(Jrwap.getPreviewWindow('mobiReviewPageFrame')).length > 0) {
        phoneHeight = $(Jrwap.getPreviewWindow('mobiReviewPageFrame')).height();
    }
    var headerHeight = 0;
    if ($('#web_header').is(":visible")) {
        headerHeight = $('#web_header').height();
    }
    var webnavHeight = 0;
    if ($("#webnav").is(":visible")) {
        webnavHeight = $('#webnav').height();
    }
    var bannerHeight = 155;
    if ($('#web_banner').is(":visible")) {
        bannerHeight = $('#web_banner').height();
    }else{
    	bannerHeight = 0;
    }
    var contentHeight = Jrwap.getMobiContentHeight();
   /* //文章高度*/
    var webContentHeight = 115;
    if($('#web_main_content').length>0&&$('#web_main_content').is(":visible")){
    	webContentHeight =  $('#web_main_content').height();
    	if(webContentHeight<contentHeight){
    		webContentHeight=contentHeight;
    	}else{
    		$('#web_main_content').css("height","auto");
    	}
    }
   /* //内容tag高度*/
    var contentTagHeight = 0;
    if($('#web_content_tag').length>0&&$('#web_content_tag').is(":visible")){
    	contentTagHeight =  $('#web_content_tag').height();
    	if(contentTagHeight<contentHeight){
    		contentTagHeight=contentHeight;
    		$('#web_content_tag').height(contentHeight);
    	}else{
    		$('#web_content_tag').css("height","auto");
    	}
    }
    /*//内容搜索高度*/
    var contentSearchHeight = 0;
    if($('#web_content_search').length>0&&$('#web_content_search').is(":visible")){
    	contentSearchHeight =  $('#web_content_search').height();
    	if(contentSearchHeight<contentHeight){
    		contentSearchHeight=contentHeight;
    		$('#web_content_search').height(contentHeight);
    	}else{
    		$('#web_content_search').css("height","auto");
    	}
    }
    /*//问卷高度*/
    var webSurveyHeight = 0;
    if($("#survey_content").length>0 && $('#survey_content').is(":visible")){
    	webSurveyHeight = $('#survey_content').height();
    }
   /* //产品内容高度*/
    var webProductHeight = 0;
    if($('#product_content').length>0&&$('#product_content').is(":visible")){
    	webProductHeight =  $('#product_content').height();
    }
    /*//图册内容高度*/
    var webPhotoboxConentHeight = 0;
    if($('#web_photobox_conent').length>0&&$('#web_photobox_conent').is(":visible")){
    	webPhotoboxConentHeight =  $('#web_photobox_conent').height();
    }
    /*//产品搜索页*/
    if($('#web_product_search').length>0&&$('#web_product_search').is(":visible")){
    	productSearchHeight =  $('#web_product_search').height();
    	if(productSearchHeight<contentHeight){
    		productSearchHeight=contentHeight;
    		$('#web_product_search').height(contentHeight);
    	}else{
    		$('#web_product_search').css("height","auto");
    	}
    }
    var containerHeight = 115;
    if ($('#web_main_content').is(":visible")) {
        containerHeight = $('#web_main_content').height();
    }
    if (containerHeight > 0 && containerHeight < 70) {
        containerHeight = 75;
    }
    var productSearchHeight = 0;
    var footerHeight = 0;
    if ($('#web_footer').is(":visible")) {
        footerHeight = $('#web_footer').height();
    }
    var dataHeight = headerHeight + webnavHeight + bannerHeight + webContentHeight + webSurveyHeight + webProductHeight + webPhotoboxConentHeight + productSearchHeight + contentTagHeight + containerHeight + footerHeight;
    $("#web_background").height(dataHeight/2);
    if (phoneHeight < dataHeight) {
        $('#return_top').show();
        $('#web_footer').removeAttr('style');
        $("#web_footer .return_top").css("display", "block");
        if (!Jrwap.isTopWindow()) {
            /*//$(Jrwap.getPreviewWindow('mobiReviewPageFrame').document).find("html").attr('style', 'font-size: 20.125px;');
            //$(Jrwap.getPreviewWindow('mobiReviewPageFrame').document).find("body").removeAttr('style');
            // $(Jrwap.getPreviewWindow('mobiReviewPageFrame').document).find("html").css('overflow-y', 'auto');
            // $(Jrwap.getPreviewWindow('mobiReviewPageFrame').document).find("body").css('overflow-y', 'auto');*/
        }
    } else {
        $('#return_top').hide();
        $('#web_footer').attr('style', 'width: 100%;');
        $("#web_footer .return_top").css("display", "none");
        if (!Jrwap.isTopWindow()) {
            $(Jrwap.getPreviewWindow('mobiReviewPageFrame').document).find("html").css('overflow-y', 'hidden');
            $(Jrwap.getPreviewWindow('mobiReviewPageFrame').document).find("body").css('overflow-y', 'hidden');
        }
    }
}
/** 模块数据计数*/
Jrwap.setCusModCount = function () {
    JRF.top._cusModuleCount++
};

Jrwap.fileUpload2 = function (f, d, g,check) {
    var e = {
        tite: "选择图片",
        type: [],
        siteDomain: "",
        maxSize: 1,
        maxUploadList: 10,
        maxChoiceList: 10,
        imgMode: 0,
        imgMaxWidth: 2048,
        imgMaxHeight: 2048,
        netFileMode: false,
        material:1
    };
    if (d) {
        $.extend(e, d)
    }
    if (JRF.top._siteVer != "undefined" && JRF.top._siteVer == 10) {
        e.maxSize = 1
    }
    var c = e.tite;
    /*// if (e.type.length > 0) {
    //     if (JRF.top._siteVer != "undefined" && JRF.top._siteVer == 10) {
    //         c += "<span style='font-weight:400;'> (只能添加" + e.type.join(",") + ", 大小不超过" + e.maxSize + "MB)</span>"
    //     } else {
    //         c += "<span style='font-weight:400;'> (只能添加" + e.type.join(",") + ", 大小不超过" + e.maxSize + "MB)</span>"
    //     }
    // } else {
    //     c += "<span style='font-weight:400;'> (上传大小不超过" + e.maxSize + "MB)</span>"
    // }*/
    var params = new Array();
    params.push("maxUploadList=" + e.maxUploadList);
    params.push("&maxChoiceList=" + e.maxChoiceList);
    params.push("&imgMode=" + e.imgMode);//0：图片类  'jpg','jpeg','png','gif','bmp','ico'2： 视频类 *.asx;*.asf;*.mpg;*.wmv;*.3gp;*.mp4;*.mov;*.avi;*.flv
    params.push("&imgMaxWidth=" + e.imgMaxWidth);
    params.push("&imgMaxHeight=" + e.imgMaxHeight);
    params.push("&entry=" + e.entry);
    params.push("&from=mobile");//判断是手机还是PC进来
    params.push("&createScale=" + e.createScale);//判断是否生成缩略图
    params.push("&material=" + e.material);//判断是否生成缩略图
    var a = JRF.top._siteDomain + "/manage/fileUploadV.jsp?" + params.join("");
    if (e.entry == "QRCodeImgUpload") {
        a = "fileUploadV.jsp?" + params.join("");
    }
    var b = {
        tite: c,
        frameSrcUrl: a,
        width: 967,
        height: 485,
        saveBeforePopup: false,
        callArgs: "add",
        closeFunc: g
    };
    if (f) {
        $(f).unbind("click").bind("click",
            function () {
	        	if(check &&  typeof check === "function"){
	        		if(!check()){
	        			return;
	        		}
	        	}
                JRF.popupWindow(b);
            });
    } else {
        JRF.popupWindow(b);
    }
};

Jrwap.radioCheckCss = function () {
    //单选按钮
    $("input[type=radio]:checked").each(function () {
        $("label[for=" + $(this).attr("id") + "]").addClass("m_radiochecked");
    });
    /*
    $("input[type=radio]").click(function () {
        var radioName = $(this).attr("name");
        var radioId = $(this).attr("id");
        $("input[name=" + radioName + "]").each(function (i, rad) {
            if ($(rad).attr("id") == radioId) {
                $(rad).attr("checked", "checked");
                $("label[for=" + radioId + "]").addClass("m_radiochecked");
            } else {
                $(rad).removeAttr("checked");
                $("label[for=" + $(rad).attr("id") + "]").removeClass("m_radiochecked");
            }
        });
    });*/
    $(".m_radio").click(function(){
    	var $radio = $(this).prev();
    	var radioName = $radio.attr("name");
        var radioId = $radio.attr("id");
        $("input[name=" + radioName + "]").each(function (i, rad) {
        	$(this).removeAttr("checked");
            $(this).next().removeClass("m_radiochecked");
        });
        $(this).addClass("m_radiochecked");
        $radio.attr("checked","checked");
        $radio.click();
    });
    
    $(".acradio").click(function(){
    	var $radio = $(this).prev();
    	var radioName = $radio.attr("name");
        var radioId = $radio.attr("id");
        $("input[name=" + radioName + "]").each(function (i, rad) {
        	$(this).removeAttr("checked");
            $(this).next().removeClass("achecked");
        });
        $(this).addClass("achecked");
        $radio.attr("checked","checked");
        $radio.click();
        
    });
    
    //复选
    $("input[type=checkbox]:checked").each(function () {
        $("label[for=" + $(this).attr("id") + "]").addClass("m_checked");
    });
    
    $("label[class^='checkbox']").click(function(){
    	if($(this).hasClass("checkboxChecked")){
    		$(this).removeClass("checkboxChecked").prev().removeAttr("checked","checked").click();
    	}else{
    		$(this).addClass("checkboxChecked").prev().attr("checked","checked").click();
    	}
    });

    
    /*$("input[type=checkbox]").click(function () {
        var radioId = $(this).attr("id");
        if ($("label[for=" + radioId + "]").hasClass("m_checked")) {
            $(this).removeAttr("checked");
            $("label[for=" + $(this).attr("id") + "]").removeClass("m_checked");
        } else {
            $(this).attr("checked", "checked");
            $("label[for=" + radioId + "]").addClass("m_checked");
        }
    });*/
}

/**清除设计记录*/
Jrwap.closeStyleDesign = function () {
    if (JRF.top._changeStyleNum == 0) {
        return
    }
    JRF.top.location.reload(true);
};
Jrwap.getAjaxUrl = function (b) {
    var a = "";
    if (document.location.pathname.indexOf("/manage/") >= 0) {
        a = "../ajax/"
    } else {
        a = "ajax/"
    }
    return a + b
};
/** 返回顶部*/
Jrwap.scrollToTop = function (b) {
    if(JRF.top._isOpenDesign) {
    	$(Jrwap.getPreviewWindow()).scrollTop(0,0);
    }else{
        $(window).scrollTop(0, 0);
    }

}
/** 设置底部服务栏*/
Jrwap.autoSetNavBarBottom = function(a) {
    if (a == 4) {
        if (JRF.top._openOnlineService) {
            jQuery("#navButton").css("bottom", parseInt(jQuery("#web_botton_service").height()) + 15 + "px");
            jQuery("#navbar").css("bottom", parseInt(jQuery("#web_botton_service").height()) + 35 + "px")
        } else {
            jQuery("#navButton").removeAttr("style");
            jQuery("#navbar").removeAttr("style")
        }
    } else {
        jQuery("#navButton").removeAttr("style");
        jQuery("#navbar").removeAttr("style")
    }
};

/**
 * 底部清理
 * */
Jrwap.footServiceClean = function(){
	if($("#qqDiv").length>0){
		$("#qqDiv").remove();
	}
	if($("#phoneDiv").length>0){
		$("#phoneDiv").remove();
	}
}
/** 手机隐藏滚动条*/
Jrwap.mobiHideScroll = function() {
    var c = document.getElementById("bodyDesign");
    var d = document.getElementsByTagName("html")[0];
    c.style.overflowY = "hidden";
    d.style.overflowY = "hidden";
    if (Wapsite.manageMode) {
    		/*//判断是否有父窗口*/
    		if(window===window.top){
    			
    		}else{
    			iFrameObj = window.parent.document.getElementById("mobiReviewPageFrame");
    			if(iFrameObj){
    				var b = JRF.top.JRF.getScrollWidth();
    	    		var a = iFrameObj.clientWidth - b;
    	    		iFrameObj.style.position = "absolute";
    	    		iFrameObj.style.left = "0px";
    	    		//iFrameObj.setAttribute("width", a + "px")
    			}
    		}
    }
};

/** 显示滚动条*/
Jrwap.mobiShowScroll = function() {
    var a = document.getElementById("bodyDesign");
    var b = document.getElementsByTagName("html")[0];
    a.style.overflowY = "";
    b.style.overflowY = "";
    if (Wapsite.manageMode) {
    	if(window===window.top){
    		return
    	}else{
    		iFrameObj = window.parent.document.getElementById("mobiReviewPageFrame");
    		if(iFrameObj){
    			iFrameObj.style.position = "";
    			iFrameObj.style.left = "";
    			iFrameObj.setAttribute("width", "100%");
    		}
    	}
        
    }
};

Jrwap.getJQMobi = function() {
    var b = Jrwap.getPreviewWindow(),
    a = b.jm;
    return a
};

Jrwap.getStyle = function(a, b) {
    var c = "";
    if (document.defaultView && document.defaultView.getComputedStyle) {
    	try{
    		c = document.defaultView.getComputedStyle(a, "").getPropertyValue(b);
    	}catch(e){
    	}
    } else {
        if (a.currentStyle) {
            b = b.replace(/\-(\w)/g,
            function(d, e) {
                return e.toUpperCase()
            });
            c = a.currentStyle[b]
        }
    }
    return c
};
Jrwap.getFrameHeight = function(d) {
    var c = parseInt(Jrwap.getStyle(d, "padding-top").replace("px", "")) + parseInt(Jrwap.getStyle(d, "padding-bottom").replace("px", ""));
    var b = parseInt(Jrwap.getStyle(d, "margin-top").replace("px", "")) + parseInt(Jrwap.getStyle(d, "margin-bottom").replace("px", ""));
    var a = parseInt(Jrwap.getStyle(d, "border-top-width").replace("px", "")) + parseInt(Jrwap.getStyle(d, "border-bottom-width").replace("px", ""));
    return a + b + c
};


Jrwap.replaceDocumentwriteText = function(b) {
    var a = b.replace(/(.*?<script[\s\S]*?)document\.write([\s\S]*?<\/script>.*?)/gi, "$1void$2");
    return a
};
Jrwap.htmlChoiceImage = function(a) {
    var b = {
        tite: "添加图片",
        maxSize: 10,
        type: ["jpg", "jpeg", "bmp", "png", "gif"],
        imgMode: 2,
        maxChoiceList: 10,
        netFileMode: true
    };
    Jrwap._htmlTmpData = a;
    Jrwap.fileUpload2("", b, Jrwap.htmlUploadBack)
};
Jrwap.htmlUploadBack = function(b) {
    var f = "";
    if (b) {
        var e = $.parseJSON(b);
        e = e.data;
        if (e.length) {
            for (var c = 0; c < e.length; c++) {
                var d = e[c].fileWidth;
                var a = e[c].fileHeight;
                f += '<img src="' + e[c].filePath + '" data-source="' + e[c].pre640ViewPath + '"';
                if (d && a) {}
                f += "/>"
            }
        } else {
            f = ""
        }
    }
    if (Jrwap._htmlTmpData) {
        Jrwap._htmlTmpData.pasteChoiceImage(f)
    }
};
Jrwap.htmlChoiceMP4 = function(a) {
    var b = {
        tite: "添加MP4",
        maxSize: parseInt(JRF.top.file_size_limit) || 5,
        type: ["mp4"],
        imgMode: 2,
        maxChoiceList: 1,
        netFileMode: true
    };
    Jrwap._htmlTmpData = a;
    Jrwap.fileUpload2("", b, Jrwap.htmlUploadBackMp4)
};
Jrwap.htmlUploadBackMp4 = function(a) {
    var c = "";
    if (a) {
        var b = $.parseJSON(a);
        b = b.data;
        if (b.length) {
            c = '<p style="text-align:center;line-height:0px"><br /></p><p style="text-align:center;line-height:0px;"><video style="width:400px;BACKGROUND:#000;height:400px" controls="controls"><source src="' + b[0].filePath + '" type="video/mp4" /><embed width="400" height="400" type="application/x-shockwave-flash" src="' + JRF.top._resSiteRoot + "/js/comm/jwplayer/jwplayer.swf?file=" + b[0].filePath + '" allowfullscreen="true" /></video><br /></p>'
        } else {
            c = ""
        }
    }
    if (Jrwap._htmlTmpData) {
        Jrwap._htmlTmpData.pasteChoiceMp4(c)
    }
};

Jrwap.initTab = function(b, d, a) {
    if (!b) {
        if ($.cookie("_mobiTabInit") && $.cookie("_mobiTabInit") !== "undefined" && $.cookie("_mobiTabInit") !== "null") {
            b = $.parseJSON($.cookie("_mobiTabInit"))
        } else {
            b = JRF.top._mobiTabInit
        }
    }
    var c;
    Jrwap.mobileSiteTab();
    if (b.initParent === 2) {
        c = Jrwap.mobiColumnTabClick()
    } else {
        if (b.initParent === 3) {
            c = Jrwap.mobiSettingTabClick()
        } else {
            if (b.initParent === 4) {
                c = Jrwap.wxPlatformTabClick()
            } else {
                if (b.initParent === 5) {
                    c = Jrwap.mobiServiceTabClick()
                } else {
                    if (b.initParent === 6 && d) {
                        c = Jrwap.mobiModuleTabClick()
                    } else {
                        c = Jrwap.mobiStyleTabClick()
                    }
                }
            }
        }
    }
    if (!d) {
        JRF.top._mobiTabInit = b
    }
    Jrwap.initFrameClick(c, b)
};
Jrwap.mobileSiteTab = function(a) {
    if ($("#topSetButtonMobi").hasClass("topSetCurrent")) {
        return
    }
    $("#topBarArea .topSetButton").removeClass("topSetCurrent");
    $("#topSetButtonMobi").addClass("topSetCurrent");
    $("#topBarArea .topSetBottom").removeClass("topSetCurrentWX").addClass("topSetCurrentMobi");
    Jrwap.mobiModuleTabClick();
    Jrwap.cutMobiTab("mobiStyleDesignPanel", "choicePanel", 0);
};
Jrwap.mobiModuleTabClick = function() {
    var a = JRF.top.$("#mobiModuleFrame"),
    b = JRF.top.$("#mobiModule");
    if (!a.attr("src") || a.attr("src").indexOf("javascript") != -1) {
        a.attr("src", "mobiModule.jsp?ram=" + Math.random())
    }
    Jrwap.switchMobiWXPanel(true);
    return a
};
Jrwap.mobiColumnTabClick = function(b) {
    var b = JRF.top.$("#tabs a").index(JRF.top.$("#mobiColumnTab"));
    Jrwap.cutMobiTab("rightIframePanels", "choicePanel", b);
    Jrwap.stylePanesShow(true);
    JRF.top.$("#mobiColumnTab").addClass("current");
    var a = JRF.top.$("#mobiColumnFrame"),
    c = JRF.top.$("#mobiColumn");
    if (!a.attr("src") || a.attr("src").indexOf("javascript") != -1) {
        a.attr("src", "mobiColumn.jsp?ram=" + Math.random())
    }
    c.show();
    JRF.top._mobiTabInit.initParent = 2;
    return a
};
Jrwap.mobiSettingTabClick = function(c) {
    var a = JRF.top.$("#tabs a").index(JRF.top.$("#mobiSettingTab"));
    Jrwap.cutMobiTab("rightIframePanels", "choicePanel", a);
    Jrwap.stylePanesShow(true);
    JRF.top.$("#mobiSettingTab").addClass("current");
    var d = JRF.top.$("#mobiSettingFrame"),
    b = JRF.top.$("#mobiSetting");
    if (!d.attr("src") || d.attr("src").indexOf("javascript") != -1) {
        d.attr("src", "mobiSetting.jsp?ram=" + Math.random());
        d.load(function() {
            if (c == "advance") {
                Jrwap.initTab({
                    initParent: 3,
                    initChild: 3
                })
            }
        })
    } else {
        if (c == "base") {
            Jrwap.initTab({
                initParent: 3,
                initChild: 0
            })
        } else {
            if (c == "advance") {
                Jrwap.initTab({
                    initParent: 3,
                    initChild: 3
                })
            }
        }
    }
    b.show();
    JRF.top._mobiTabInit.initParent = 3;
    return d
};
Jrwap.mobiStyleTabClick = function(a) {
    var a = JRF.top.$("#tabs a").index(JRF.top.$("#mobiStyleTab"));
    Jrwap.cutMobiTab("rightIframePanels", "choicePanel", a);
    Jrwap.stylePanesShow(true);
    JRF.top.$("#mobiStyleTab").addClass("current");
    var c = JRF.top.$("#mobiStyleFrame"),
    b = JRF.top.$("#mobiStyle");
    if (!c.attr("src") || c.attr("src").indexOf("javascript") != -1) {
        c.attr("src", "mobiStyle.jsp?ram=" + Math.random())
    }
    b.show();
    JRF.top._mobiTabInit.initParent = 0;
    return c
};
Jrwap.wxPlatformTabClick = function(d, c) {
    var e = {};
    e.fun = function() {
        Jrwap.styleRecover();
    };
    if (Jrwap.checkSaveBar(e, true)) {
        return false
    }
    if ($("#topSetButtonWX").hasClass("topSetCurrent")) {
        return
    }
    $("#topBarArea .topSetButton").removeClass("topSetCurrent");
    $("#topSetButtonWX").addClass("topSetCurrent");
    $("#topBarArea .topSetBottom").addClass("topSetCurrentWX").removeClass("topSetCurrentMobi");
    Jrwap.cutMobiTab("mobiStyleDesignPanel", "choicePanel", 1);
    JRF.top.$("#wxSettingTab").addClass("current");
    var b = JRF.top.$("#wxSettingFrame"),
    a = JRF.top.$("#wxSetting");
    Jrwap.switchMobiWXPanel(false);
    if (!b.attr("src") || b.attr("src").indexOf("javascript") != -1) {
        b.attr("src", "wxPlatform.jsp?ram=" + Math.random())
    }
    a.show();
    Jrwap.initFrameClick(b, c);
    return b
};
Jrwap.mobiServiceTabClick = function(b) {
    var b = JRF.top.$("#tabs a").index(JRF.top.$("#mobiServiceTab"));
    Jrwap.cutMobiTab("rightIframePanels", "choicePanel", b);
    Jrwap.stylePanesShow(true);
    JRF.top.$("#mobiServiceTab").addClass("current");
    var a = JRF.top.$("#mobiServiceFrame"),
    c = JRF.top.$("#mobiService");
    if (!a.attr("src") || a.attr("src").indexOf("javascript") != -1) {
        a.attr("src", "mobiService.jsp?ram=" + Math.random());
    }
    JRF.top._mobiTabInit.initParent = 5;
    return a
};
Jrwap.initFrameClick = function(c, a) {
	function b(f) {
        var e = c[0].contentDocument.querySelector(".mobiLeftSidebar"),
        d = e ? e.querySelectorAll(".mobiTemColumn") : null;
        if (d) {
            if (f) {
                a.initChild = e.querySelector(".mobiTabCurrent") ? parseInt($(e.querySelector(".mobiTabCurrent")).attr("_pos")) : 0
            }
            if (d[a.initChild]) {
                d[a.initChild].click()
            } else {
                a.initChild = 0;
                d[a.initChild].click()
            }
        }
    };
	if(!JRF.isNull(c[0])){
		if (c[0].contentDocument && c[0].contentDocument.body.innerHTML == "") {
	        c[0].onload = function() {
	            b();
	        }
	    } else {
	        b();
	    }
	}
};
Jrwap.switchMobiWXPanel = function(d) {
    var f = JRF.top.$("#saveButton");
    var a = JRF.top.$("#cancelButton");
    var e = JRF.top.$("#viewButton");
    var b = JRF.top.$("#mobiReview");
    var c = JRF.top.$("#ing");
    if (d) {
        f.css("display", "block");
        a.css("display", "block");
        e.css("display", "block");
        b.show()
    } else {
        f.css("display", "none");
        a.css("display", "none");
        e.css("display", "none");
        b.hide()
    }
    c.remove()
};
Jrwap.stylePanesShow = function(a) {
    if (a) {
        JRF.top.$("#panes > .mobiModuleFrame").hide();
        JRF.top.$("#tabs a").removeClass("current");
    }
    JRF.top.$("#tabs > li").hover(function() {
        var b = $(this).find("a").hasClass("current");
        if (!b) {
            $(this).addClass("tabHover").siblings().removeClass("tabHover")
        }
    },
    function() {
        var b = $(this).find("a").hasClass("current");
        if (!b) {
            $(this).removeClass("tabHover");
        }
    });
    JRF.top.$("#tabs > li").bind("click",
    function() {
        $(this).removeClass("tabHover");
    });
};
Jrwap.styleLoading = function(a, c) {
    if (!a || !c) {
        return
    }
    var b = $('<div class="forWaiting ajaxLoading2" style="position:absolute;background-color:#fff;width:100%;height:400px;top:0px;left:0;"></div>');
    b.appendTo("#" + a);
    $("#" + c).load(function() {
        $(".forWaiting").remove()
    });
};
var searzBtnx;
var cleanUp;
var historySearch;
if("undefined" == typeof SiteLanguage || SiteLanguage == "cn"){
    cleanUp = '清空历史记录';
    historySearch = '历史搜索';
}else if(SiteLanguage == "en"){
    cleanUp = 'Empty history';
    historySearch = 'History Search';
}else if(SiteLanguage == "tcn"){
    cleanUp = '清空歷史記錄';
    historySearch = '歷史蒐索';
}else if(SiteLanguage == "jap"){
    cleanUp = 'をクリアする';
    historySearch = '歴史検索';
}else if(SiteLanguage == "kor"){
    cleanUp = '역사 기록 비우기';
    historySearch = '역사 검색';
}else if(SiteLanguage == "lo"){
    cleanUp = 'ປະຫວັດທີ່ຈະແຈ້ງ';
    historySearch = 'ค้นหาประวัติ';
}else if(SiteLanguage == "th"){
    cleanUp = 'ล้างประวัติ';
    historySearch = 'ค้นหาประวัติ';
}else if(SiteLanguage == "es"){
    cleanUp = 'Vaciar historial';
    historySearch = 'La historia de búsqueda';
}else if(SiteLanguage == "ru"){
    cleanUp = 'Очистить  историю ';
    historySearch = 'история поиска ';
}else if(SiteLanguage == "fra"){
    cleanUp = "L'histoire de vide";
    historySearch = "L'historique de recherche";
}else if(SiteLanguage == "it"){
    cleanUp = 'Svuota La storia';
    historySearch = 'La storia di Ricerca';
}else if(SiteLanguage == "de"){
    cleanUp = '- ihre Geschichte Records';
    historySearch = 'Geschichte suchen';
}
Jrwap.popupSearch = function(b,statics) {
	if (!b || !typeof b.moduleType || !typeof b.searchTip || !typeof b.hotTopic) {
		return
	}
	var f;
	var keys = [];
	var e = [];
    var locationDomain = b.domain;
    if("undefined" == typeof SiteLanguage || SiteLanguage == "cn"){
        searzBtnx = '搜索';
    }else if(SiteLanguage == "en"){
        searzBtnx = 'Search';
    }else if(SiteLanguage == "tcn"){
        searzBtnx = '蒐索';
    }else if(SiteLanguage == "jap"){
        searzBtnx = 'かいさぐる';
    }else if(SiteLanguage == "kro"){
        searzBtnx = '검색';
    }else if(SiteLanguage == "lo"){
        searzBtnx = 'ຄົ້ນຫາ';
    }else if(SiteLanguage == "th"){
        searzBtnx = 'ค้นหา';
    }else if(SiteLanguage == "es"){
        searzBtnx = 'La búsqueda';
    }else if(SiteLanguage == "ru"){
        searzBtnx = 'поиск';
    }else if(SiteLanguage == "fra"){
        searzBtnx = 'recherche';
    }else if(SiteLanguage == "it"){
        searzBtnx = 'Ricerca';
    }else if(SiteLanguage == "de"){
        searzBtnx = 'Suche';
    }
	if(b.searchTip==''||$.trim(b.searchTip).length==0){
        if("undefined" == typeof SiteLanguage || SiteLanguage == "cn"){
            b.searchTip = '请输入搜索内容';
        }else if(SiteLanguage == "en"){
            b.searchTip = 'Please enter the search content';
        }else if(SiteLanguage == "tcn"){
            b.searchTip = '請輸入蒐索內容';
        }else if(SiteLanguage == "jap"){
            b.searchTip = '検索内容を入力してください';
        }else if(SiteLanguage == "kro"){
            b.searchTip = '검색 내용을 입력 해 주십시오';
        }else if(SiteLanguage == "lo"){
            b.searchTip = 'ກະລຸນາໃສ່ການຊອກຫາ';
        }else if(SiteLanguage == "th"){
            b.searchTip = 'โปรดระบุสิ่งที่คุณกำลัง';
        }else if(SiteLanguage == "es"){
            b.searchTip = 'Por favor ingrese la búsqueda de contenido';
        }else if(SiteLanguage == "ru"){
            b.searchTip = 'Пожалуйста, введите поиск содержимого';
        }else if(SiteLanguage == "fra"){
            b.searchTip = 'Recherche de saisie';
        }else if(SiteLanguage == "it"){
            b.searchTip = 'Inserisci quello che stai cercando';
        }else if(SiteLanguage == "de"){
            b.searchTip = 'Bitte geben Sie, was Sie suchen';
        }
	}
	jQuery.ajax({
		url:JRF.curr_protocol+'//'+locationDomain+'/ajax/getContentSearchKeys.jsp',
		dataType:'json',
		async:false,
		success:function(data){
			if(data.data.length>0){
				keys = data.data;
			}
		}
	});
	e.push('<div id="jrfSearchWin" class="jrf_search_win" >');
	e.push('	<div class="searchInputBar searchBox searchBoxStyleT10">');
	e.push('		<div class="searchBoxContainer">');
	e.push('			<input id="searchInput" class="g_itext" type="search" placeholder="' + b.searchTip + '">');
	e.push('			<a href="javascript:void(0);" class="g_btn searchBoxBtn" id="searchBoxBtn"><span>'+searzBtnx+'</span></a>');
	e.push("		</div>");
	e.push('		<a href="javascript:void(0);" class="icon-mobi search_back_btn" id="closeSearch"></a>');
	e.push("	</div>");
	if(keys.length>0){
	    e.push('    <div class="search_content" id="search_keywords_content">');
	    e.push('        <p class="log_hd">'+historySearch+'</p>');
	    e.push('        <div class="search_log">');
		for(var i=0;i<keys.length;i++){
			e.push('            <div class="log_item">');
            if(statics && statics=="1"){
                e.push('                <a href="/search/mcontent_search.html?key='+Jrwap.encodeUrl(keys[i])+'" class="log_text">'+keys[i]+'</a>');
            }else{
                e.push('                <a href="/mConts.jsp?key='+Jrwap.encodeUrl(keys[i])+'" class="log_text">'+keys[i]+'</a>');
            }
	        e.push('                <a href="javascript:void(0);" class="log_colse" attr_value="'+keys[i]+'">×</a>');
	        e.push('            </div>');
		}
	    e.push('        </div>');
	    e.push('        <a href="javascript:void(0);" class="clean_up" id="clean_all_search_keywords">'+cleanUp+'</a>');
	    e.push("    </div>");
	}
	e.push("</div>");
	var c = jQuery(e.join(""));
	switch (b.moduleType) {
	case 0:
		c.find("#searchInput").css("padding-right", "1.8rem");
		break;
	case 1:
		c.find("#searchInput").css("padding-right", "2.5rem");
		break;
	case 2:
		c.find("#searchInput").css("padding-right", "2.5rem");
		break;
	case 3:
		c.find("#searchInput").css("padding-right", "1.8rem");
		break;
	case 4:
		c.find("#searchInput").css("padding-right", "3.3rem");
		break;
	case 5:
		c.find("#searchInput").css("padding-right", "1.8rem");
		break
	}
	jQuery("#bodyDesign").append(c);
	var jrfSearchWin = Jrwap.getPreviewObject("jrfSearchWin");
	var frame = JRF.top.document.getElementById("mobiReviewPageFrame");
	$(frame).attr("scrolling","yes");
	
	jQuery("#closeSearch").on("click",function() {
		jQuery("#jrfSearchWin").on("animationend webkitAnimationEnd msAnimationEnd oAnimationEnd oanimationend",
		function() {
			$(frame).attr("scrolling","yes");
			jQuery("#jrfSearchWin").remove();
			jQuery(this).off("animationend webkitAnimationEnd msAnimationEnd oAnimationEnd oanimationend")
		});
		jQuery("#jrfSearchWin").addClass("jrfSearchWinOff");
		jQuery(this).off("click")
	});
	
	jQuery("#search_keywords_content").on("click",".log_colse",function(){
		var _this = jQuery(this);
		var key = jQuery(this).attr("attr_value");
		jQuery.ajax({
			url:JRF.curr_protocol+'//'+locationDomain+'/ajax/delContentSearchKey.jsp',
			dataType:'json',
			data:{"key":Jrwap.encodeUrl(key)},
			success:function(data){
				if(data.code=="200"){
					_this.parent().remove();
				}
			}
		});
		return false
	});
	
	jQuery("#clean_all_search_keywords").on("click",function(){
		jQuery.ajax({
			url:JRF.curr_protocol+'//'+locationDomain+'/ajax/delAllContentSearchKey.jsp',
			dataType:'json',
			success:function(data){
				if(data.code=="200"){
					jQuery("#search_keywords_content").remove();
				}
			}
		});
		return false
	});
	
	jQuery("#icon-searchSubmit").on("click",function() {
		f = jQuery.trim(jQuery("#searchInput").val());
		if (f == "") {
			jQuery("#searchInput").get(0).focus();
			return
		}
		Jrwap.contentSearchInMobi(f, b,statics);
		jQuery(this).off("click")
	});
	
	jQuery("#jrfSearchWin").on("keypress", "#searchInput",function(k) {
		if (k.which === 13) {
			f = jQuery.trim(jQuery("#searchInput").val());
			if(f!=''&&f.length>0){
				Jrwap.contentSearchInMobi(f, b,statics);
			}
			return false
		}
	}).on("click","#searchBoxBtn",function(){
		f = jQuery.trim(jQuery("#searchInput").val());
		if(f!=''&&f.length>0){
			Jrwap.contentSearchInMobi(f, b,statics);
		}
		return false
	});
	if(jQuery("#searchInput").length>0){
		jQuery("#searchInput").get(0).focus();	
	}
};
/**
 * 产品搜索
 * b object 对象
 * statics 静态化 1 开启
 * */
Jrwap.popupProductSearch = function(b,statics) {
	if (!b || !typeof b.moduleType || !typeof b.searchTip || !typeof b.hotTopic) {
		return
	}
	var f;
	var keys = [];
	var e = [];
    var locationDomain = b.domain;
    if("undefined" == typeof SiteLanguage || SiteLanguage == "cn"){
            searzBtnx = '搜索';
        }else if(SiteLanguage == "en"){
            searzBtnx = 'Search';
        }else if(SiteLanguage == "tcn"){
            searzBtnx = '蒐索';
        }else if(SiteLanguage == "jap"){
            searzBtnx = 'かいさぐる';
        }else if(SiteLanguage == "kro"){
            searzBtnx = '검색';
        }else if(SiteLanguage == "lo"){
            searzBtnx = 'ຄົ້ນຫາ';
        }else if(SiteLanguage == "th"){
            searzBtnx = 'ค้นหา';
        }else if(SiteLanguage == "es"){
            searzBtnx = 'La búsqueda';
        }else if(SiteLanguage == "ru"){
            searzBtnx = 'поиск';
        }else if(SiteLanguage == "fra"){
            searzBtnx = 'recherche';
        }else if(SiteLanguage == "it"){
            searzBtnx = 'Ricerca';
        }else if(SiteLanguage == "de"){
            searzBtnx = 'Suche';
        }
	if(b.searchTip==''||$.trim(b.searchTip).length==0){
        if("undefined" == typeof SiteLanguage || SiteLanguage == "cn"){
            b.searchTip = '请输入搜索内容';
        }else if(SiteLanguage == "en"){
            b.searchTip = 'Please enter the search content';
        }else if(SiteLanguage == "tcn"){
            b.searchTip = '請輸入蒐索內容';
        }else if(SiteLanguage == "jap"){
            b.searchTip = '検索内容を入力してください';
        }else if(SiteLanguage == "kro"){
            b.searchTip = '검색 내용을 입력 해 주십시오';
        }else if(SiteLanguage == "lo"){
            b.searchTip = 'ກະລຸນາໃສ່ການຊອກຫາ';
        }else if(SiteLanguage == "th"){
            b.searchTip = 'โปรดระบุสิ่งที่คุณกำลัง';
        }else if(SiteLanguage == "es"){
            b.searchTip = 'Por favor ingrese la búsqueda de contenido';
        }else if(SiteLanguage == "ru"){
            b.searchTip = 'Пожалуйста, введите поиск содержимого';
        }else if(SiteLanguage == "fra"){
            b.searchTip = 'Recherche de saisie';
        }else if(SiteLanguage == "it"){
            b.searchTip = 'Inserisci quello che stai cercando';
        }else if(SiteLanguage == "de"){
            b.searchTip = 'Bitte geben Sie, was Sie suchen';
        }
	}
    
	jQuery.ajax({
		url:JRF.curr_protocol+'//'+locationDomain+'/ajax/getProductSearchKeys.jsp',
		dataType:'json',
		async:false,
		success:function(data){
            $("#bodyDesign").css({
                'overflow-y':'hidden'
            });
			if(data.data.length>0){
				keys = data.data;
			}
		}
	});
	e.push('<div id="jrfSearchWin" class="jrf_search_win" >');
	e.push('	<div class="searchInputBar searchBox searchBoxStyleT10">');
	e.push('		<div class="searchBoxContainer">');
	e.push('			<input id="searchInput" class="g_itext" type="search" placeholder="' + b.searchTip + '">');
	e.push('			<a href="javascript:void(0);" class="g_btn searchBoxBtn" id="searchBoxBtn"><span>'+searzBtnx+'</span></a>');
	e.push("		</div>");
	e.push('		<a href="javascript:void(0);" class="search_back_btn icon-mobi" id="closeSearch"></a>')
	e.push("	</div>");
	if(keys.length>0){
	    e.push('    <div class="search_content" id="search_keywords_content">');
	    e.push('        <p class="log_hd">'+historySearch+'</p>');
	    e.push('        <div class="search_log">');
		for(var i=0;i<keys.length;i++){
			e.push('            <div class="log_item">');
            if(statics && statics =="1"){
                e.push('                <a href="/search/mproduct_search.html?key='+Jrwap.encodeUrl(keys[i])+'" class="log_text">'+keys[i]+'</a>');
            }else{
                e.push('                <a href="/mPs.jsp?key='+Jrwap.encodeUrl(keys[i])+'" class="log_text">'+keys[i]+'</a>');
            }
	        e.push('                <a href="javascript:void(0);" class="log_colse" attr_value="'+keys[i]+'">×</a>');
	        e.push('            </div>');
		}
	    e.push('        </div>');
	    e.push('        <a href="javascript:void(0);" class="clean_up" id="clean_all_search_keywords">'+cleanUp+'</a>');
	    e.push("    </div>");
	}
	e.push("</div>");
	var c = jQuery(e.join(""));
	switch (b.moduleType) {
	case 0:
		c.find("#searchInput").css("padding-right", "1.8rem");
		break;
	case 1:
		c.find("#searchInput").css("padding-right", "2.5rem");
		break;
	case 2:
		c.find("#searchInput").css("padding-right", "2.5rem");
		break;
	case 3:
		c.find("#searchInput").css("padding-right", "1.8rem");
		break;
	case 4:
		c.find("#searchInput").css("padding-right", "3.3rem");
		break;
	case 5:
		c.find("#searchInput").css("padding-right", "1.8rem");
		break
	}
	jQuery("#bodyDesign").append(c);
	var jrfSearchWin = Jrwap.getPreviewObject("jrfSearchWin");
	var frame = JRF.top.document.getElementById("mobiReviewPageFrame");
	$(frame).attr("scrolling","yes");
	
	jQuery("#closeSearch").on("click",function() {
        $("#bodyDesign").css({
            'overflow-y':'auto'
        });
		jQuery("#jrfSearchWin").on("animationend webkitAnimationEnd msAnimationEnd oAnimationEnd oanimationend",
		function() {
			$(frame).attr("scrolling","yes");
			jQuery("#jrfSearchWin").remove();
			jQuery(this).off("animationend webkitAnimationEnd msAnimationEnd oAnimationEnd oanimationend")
		});
		jQuery("#jrfSearchWin").addClass("jrfSearchWinOff");
		jQuery(this).off("click")
	});
	
	jQuery("#search_keywords_content").on("click",".log_colse",function(){
		var _this = jQuery(this);
		var key = jQuery(this).attr("attr_value");
		jQuery.ajax({
			url:JRF.curr_protocol+'//'+locationDomain+'/ajax/delProductSearchKey.jsp',
			dataType:'json',
			data:{"key":Jrwap.encodeUrl(key)},
			success:function(data){
				if(data.code=="200"){
					_this.parent().remove();
				}
			}
		});
		return false
	});
	
	jQuery("#clean_all_search_keywords").on("click",function(){
		jQuery.ajax({
			url:JRF.curr_protocol+'//'+locationDomain+'/ajax/delAllProductSearchKey.jsp',
			dataType:'json',
			success:function(data){
				if(data.code=="200"){
					jQuery("#search_keywords_content").remove();
				}
			}
		});
		return false
	});
	
	jQuery("#icon-searchSubmit").on("click",function() {
		f = jQuery.trim(jQuery("#searchInput").val());
		if (f == "") {
			jQuery("#searchInput").get(0).focus();
			return
		}
		Jrwap.productSearchInMobi(f, b,statics);
		jQuery(this).off("click")
	});
	
	jQuery("#jrfSearchWin").on("keypress", "#searchInput",function(k) {
		if (k.which === 13) {
			f = jQuery.trim(jQuery("#searchInput").val());
			if(f!=''&&f.length>0){
				Jrwap.productSearchInMobi(f, b,statics);
			}
			return false
		}
	}).on("click","#searchBoxBtn",function(){
		f = jQuery.trim(jQuery("#searchInput").val());
		if(f!=''&&f.length>0){
			Jrwap.productSearchInMobi(f, b,statics);
		}
		return false
	});
	if(jQuery("#searchInput").length>0){
		jQuery("#searchInput").get(0).focus();	
	}
};

Jrwap.productSearchInMobi = function(f,b,statics){
    var reqUrl = "";
    if(statics && statics =="1"){
        reqUrl = "/search/mproduct_search.html";
        reqUrl+="?key="+JRF.encodeUrl(JRF.encodeUrl(f));
    }else{
        reqUrl = "/mPs.jsp?rn="+Math.random();
        reqUrl+="&key="+JRF.encodeUrl(JRF.encodeUrl(f));
    }
    var frame = JRF.top.document.getElementById("mobiReviewPageFrame");
    $(frame).attr("scrolling","yes");
    window.location.href = reqUrl;
}

Jrwap.contentSearchInMobi = function(f,b,statics){
    var reqUrl = "";
    if(statics && statics =="1"){
        reqUrl = "/search/mcontent_search.html";
        reqUrl+="?key="+JRF.encodeUrl(JRF.encodeUrl(f));
    }else{
        reqUrl = "/mConts.jsp?rn="+Math.random();
        reqUrl+="&key="+JRF.encodeUrl(JRF.encodeUrl(f));
    }
	var frame = JRF.top.document.getElementById("mobiReviewPageFrame");
	$(frame).attr("scrolling","yes");
	window.location.href = reqUrl;
}

Jrwap.loadFile = function() {
    var a = [];
    function b(h, g) {
        try {
            for (var d = 0,
            c; c = a[d++];) {
                if (c.doc === h && c.url == (g.src || g.href)) {
                    return c
                }
            }
        } catch(f) {
            return null
        }
    }
    return function(i, h, e) {
        var f = b(i, h);
        if (f) {
            if (f.ready) {
                e && e(f)
            } else {
                f.funs.push(e)
            }
            return
        }
        a.push({
            doc: i,
            url: h.src || h.href,
            funs: [e]
        });
        if (!i.body) {
            var d = [];
            for (var g in h) {
                if (g == "tag") {
                    continue
                }
                d.push(g + '="' + h[g] + '"')
            }
            i.write("<" + h.tag + " " + d.join(" ") + " ></" + h.tag + ">");
            return
        }
        if (h.id && h.realTime) {
            var j = i.getElementById(h.id);
            if (j && j.parentNode) {
                j.parentNode.removeChild(j)
            }
        }
        if (h.id && i.getElementById(h.id)) {
            return
        }
        var c = i.createElement(h.tag);
        delete h.tag;
        for (var g in h) {
            c.setAttribute(g, h[g])
        }
        c.onload = c.onreadystatechange = function() {
            if (!this.readyState || /loaded|complete/.test(this.readyState)) {
                f = b(i, h);
                if (f.funs.length > 0) {
                    f.ready = 1;
                    for (var k; k = f.funs.pop();) {
                        k(f)
                    }
                }
                c.onload = c.onreadystatechange = null
            }
        };
        c.onerror = function() {
            throw Error("加载文件 " + (h.href || h.src) + " 失败 ")
        };
        i.getElementsByTagName("head")[0].appendChild(c)
    }
} ();

Jrwap.loadBeforeCssFile = function() {
    var a = [];
    function b(h, g) {
        try {
            for (var d = 0,
            c; c = a[d++];) {
                if (c.doc === h && c.url == (g.src || g.href)) {
                    return c
                }
            }
        } catch(f) {
            return null
        }
    }
    return function(i, h, e) {
        var f = b(i, h);
        if (f) {
            if (f.ready) {
                e && e(f)
            } else {
                f.funs.push(e)
            }
            return
        }
        a.push({
            doc: i,
            url: h.src || h.href,
            funs: [e]
        });
        if (!i.body) {
            var d = [];
            for (var g in h) {
                if (g == "tag") {
                    continue
                }
                d.push(g + '="' + h[g] + '"')
            }
            i.write("<" + h.tag + " " + d.join(" ") + " ></" + h.tag + ">");
            return
        }
        if (h.id && h.realTime) {
            var j = i.getElementById(h.id);
            if (j && j.parentNode) {
                j.parentNode.removeChild(j)
            }
        }
        if (h.id && i.getElementById(h.id)) {
            return
        }
        var c = i.createElement(h.tag);
        delete h.tag;
        for (var g in h) {
            c.setAttribute(g, h[g])
        }
        c.onload = c.onreadystatechange = function() {
            if (!this.readyState || /loaded|complete/.test(this.readyState)) {
                f = b(i, h);
                if (f.funs.length > 0) {
                    f.ready = 1;
                    for (var k; k = f.funs.pop();) {
                        k(f)
                    }
                }
                c.onload = c.onreadystatechange = null
            }
        };
        c.onerror = function() {
            throw Error("加载文件 " + (h.href || h.src) + " 失败 ")
        };
        $(Jrwap.getPreviewObject("mobiStyleModule")).before(c);
    }
} ();

Jrwap.changeModuleStyle = function(b, d, a) {
    var b = Jrwap.getPreviewWindow().$("#" + b);
    var moduleClass = b.attr("class");
    if(!JRF.isNull(moduleClass)){
    	var c = moduleClass.replace(/moduleStyle\d+/, "moduleStyle" + d);
        c = c.replace(/template\d+/, "template" + a);
        b.attr("class", c)
    }
};

/** 初始化底部服务*/
Jrwap.initSwipe = function(p, d) {
    var j = Jrwap.getJQMobi();
    var f = Jrwap.getPreviewObject(p);
    if (!f) {
        return
    }
    if (jm._swipehandle) {
        jm._swipehandle.kill()
    }
    var b = f.querySelectorAll(".bannerImageDiv.customBanner"),
    i = f.querySelectorAll(".bannerImageDiv"),
    m = b.length,
    g = i.length,
    l = f.offsetWidth,
    o = "",
    h = 0;
    for (var k = 0; k < m; k++) {
        var a = parseInt(b[k].getAttribute("vwidth")),
        n = parseInt(b[k].getAttribute("vheight")),
        e = n / a;
        if (e > h) {
            h = e
        }
    }
    if (g === 0) {
        f.querySelector(".defaultBanner").style.height = Math.ceil(l * 300 / 640) + "px"
    } else {
        o = g - m > 0 ? (l * h < l * 300 / 640 ? Math.ceil(l * 300 / 640) : Math.ceil(l * h)) : Math.ceil(l * h);
        f.style.height = o + "px"
    }
    jm._swipehandle = j("#" + p).swipehandle(f, {
        auto: 3000,
        continuous: true,
        bulletsClick: true,
        callback: function(r) {
            var q = c.length;
            while (q--) {
                c[q].className = " "
            }
            if (!c[r]) {
                c[r - c.length].className = "on"
            } else {
                c[r].className = "on"
            }
        }
    });
    if (!f.querySelector(".bullets")) {
        return
    }
    var c = f.querySelector(".bullets").getElementsByTagName("li")
};
Jrwap.logoSizeCompressByMargin = function() {
    //var l = document.getElementById("pageLogo");
    var j = document.getElementById("web_header");
    if (j.style.display == "none") {
        return
    }
    
    var c = parseInt(e(j).height.replace("px", ""));
/*//    var b = parseInt(e(l).marginTop.replace("px", ""));
//    var h = parseInt(e(l).marginBottom.replace("px", ""));
//    var i = parseInt(e(l).height.replace("px", ""));
//    var a = parseInt(l.attributes.sid.value);
//    var k = parseInt(l.attributes.pw.value);
//    var d = parseInt(l.attributes.ph.value);
//    var g = l.className;
//    var f = 0;
//   f = c - b - h;
//    l.style.height = f + "px";
//    if (a != 0) {
//        l.style.width = e(l).height
//    } else {
//        l.style.width = parseInt(e(l).height.replace("px", "")) * k / d + "px"
//    }*/
    function e(m) {
        var n = null;
        if (window.getComputedStyle) {
            n = window.getComputedStyle(m, null)
        } else {
            n = m.currentStyle
        }
        return n
    }
};
/** 定位logo位置*/
Jrwap.titePositionRefreshByLogo = function() {
    var m = document.getElementById("pageLogo");
    var i = document.getElementById("header");
    var d = document.getElementById("pagetite");
    var a = document.getElementById("web_header");
    if (jQuery(a).css("display") == "none") {
        return
    }
    jQuery(m).css({
        position: "",
        float: "",
        left: "",
        right: ""
    });
    if (JRF.top._mobiSitetite.align == 0) {
        jQuery(i).css("text-align", "")
    } else {
        if (JRF.top._mobiSitetite.align == 1) {
            jQuery(i).css("text-align", "left")
        } else {
            if (JRF.top._mobiSitetite.align == 2) {
                jQuery(i).css("text-align", "center")
            } else {
                jQuery(i).css("text-align", "right")
            }
        }
    }
    jQuery(i).css("padding", "");
    jQuery(d).css("max-width", "");
    var k = parseInt(jQuery(i).width());
    var g = parseInt(jQuery(m).width());
    var c = parseInt(jQuery(m).css("margin-left").replace("px", ""));
    var b = parseInt(jQuery(m).css("margin-right").replace("px", ""));
    var f = parseInt(jQuery(i).css("padding-left").replace("px", ""));
    var e = parseInt(jQuery(i).css("padding-right").replace("px", ""));
    var j = parseInt(jQuery(d).css("padding-left").replace("px", ""));
    var l = parseInt(jQuery(d).css("padding-right").replace("px", ""));
    var h = parseInt(jQuery(d).width());
    if (jQuery(m).css("display") != "none") {
        jQuery(d).css("max-width", (k - g - c - b - j - l - 10) + "px");
        if (jQuery(i).css("text-align") == "center" && (jQuery(m).hasClass("left") || jQuery(m).hasClass("right"))) {
            jQuery(m).css({
                position: "absolute",
                "float": "none"
            });
            jQuery(i).css("padding", 0);
            if (jQuery(m).hasClass("left")) {
                if (f > 0) {
                    jQuery(m).css("left", f + "px")
                } else {
                    jQuery(m).css("left", 0)
                }
                if (jQuery(d).offset().left < (jQuery(m).offset().left + g)) {
                    jQuery(i).css("padding", "0 0 0 " + (f + c + b + g) + "px");
                    jQuery(i).css("text-align", "left")
                }
            } else {
                if (jQuery(m).hasClass("right")) {
                    if (e > 0) {
                        jQuery(m).css("right", e + "px")
                    } else {
                        jQuery(m).css("right", 0)
                    }
                    if ((jQuery(d).offset().left + parseInt(jQuery(d).width())) > jQuery(m).offset().left) {
                        jQuery(i).css("padding", "0 " + (e + c + b + g) + "px 0 0");
                        jQuery(i).css("text-align", "right")
                    }
                }
            }
        } else {
            if (jQuery(i).css("text-align") == "center") {
                jQuery(i).css("padding", 0);
                if (f > 0) {
                    if ((jQuery(m).offset().left) <= (jQuery(i).offset().left + f) || (jQuery(d).offset().left) <= (jQuery(i).offset().left + f)) {
                        jQuery(i).css("padding", "");
                        jQuery(i).css("text-align", "left")
                    }
                } else {
                    if (e > 0) {
                        if ((jQuery(m).offset().left + g) >= (jQuery(i).offset().left + k) || (jQuery(d).offset().left + parseInt(jQuery(d).width())) >= (jQuery(i).offset().left + k)) {
                            jQuery(i).css("padding", "");
                            jQuery(i).css("text-align", "right")
                        }
                    }
                }
            }
        }
    } else {
        jQuery(d).css("max-width", (k - j - l) + "px");
        if (jQuery(i).css("text-align") == "center") {
            jQuery(i).css("padding", 0);
            if (f > 0 && (jQuery(d).offset().left <= f)) {
                jQuery(i).css("padding", "")
            } else {
                if (e > 0 && (jQuery(d).offset().left + parseInt(jQuery(d).width()) >= (k - e))) {
                    jQuery(i).css("padding", "")
                }
            }
        }
    }
};

Jrwap.noticeUpDownSizeChange = function(d) {
    var b = jQuery("#noticeMarquee" + d),
    a = b.height(),
    c = b.children().children();
    jQuery.each(c,
    function(e, f) {
        jQuery(f).css("top", -(a + 2) + "px")
    });
    jQuery("#noticeScrollbar" + d).removeData("_innerHeight")
};
Jrwap.logout = function(a) {
    $("body").showLoading();
    $.ajax({
        type: "post",
        url: Jrwap.getAjaxUrl("login_h.jsp?cmd=logout"),
        error: function() {
            JRF.layer("服务繁忙，请稍后再试。。。")
        },
        success: function(b) {
        	$("body").hideLoading();
            JRF.successHandle(b, "", "系统繁忙，请稍后重试。", a, 1, 1)
        }
    });
};
Jrwap.showMore = function() {
    var b = document.getElementById("sharePanel");
    var a = document.getElementById("showOrHide");
    if (b && b.style) {
        if (b.style.height == "auto") {
            b.style.height = "";
            a.className = a.className.replace("hideIcon", "showIcon");
            b.style.background = ""
        } else {
            b.style.height = "auto";
            a.className = a.className.replace("showIcon", "hideIcon")
        }
    }
};


/** 调用主题后从新渲染模板 废弃方法*/
Jrwap.initTemplateByTheme = function(f){
	var l = f.layout,
    a = f.animat,
    d = f.designType,
    c = Jrwap.getPreviewObject("navbar"),
    b = Jrwap.getPreviewObject("navbarList");
    if(l == null){
    	l = f;
    }
    if (c) {
        c.setAttribute("style", "")
    }
    if (b) {
        b.setAttribute("style", "")
    }
    jQuery(Jrwap.getPreviewObject("webTop")).css("height", "");
    Jrwap.removeAllSwipeMenuClass();
    /*//获取头部导航元素与横幅导航元素*/
    var headNav,bannerNav;
    headNav = Jrwap.getPreviewObject("navbar");
    bannerNav = Jrwap.getPreviewObject("navbar");
    /*//定位判断 1:左上，2:右上，3:横幅上，4:横幅下，5:左下*/
    if(l==1){
    	/*//动画判断*/
    	if(a==11){
    		/*//左侧滑出*/
    	}else if(a==12){
    		/*//上侧滑出*/
    	}
    }else if(l==2){
    	/*//动画判断 */
    	if(a==22){
    		/*//上侧滑出*/
    	}else if(a==23){
    		/*//右侧滑出*/
    	}
    }else if(l==3){
    	
    }else if(l==4){
    	
    }else if(l==5){
    	/*//动画判断*/
    	if(a==51){
    		/*//左侧滑出*/
    	}else if(a==54){
    		/*//下侧滑出*/
    	}
    }
    /** 顶部层定位*/
    Jrwap.autoFixGWebTop(l);
};

/** 手机展示也定位*/
Jrwap.autoFixGWebTop=function(a){
	/* var c = Jrwap.getPreviewObject("bodyDesign"),
	    d = Jrwap.getPreviewObject("web_header");
	    c.style.paddingTop = (d.offsetHeight) + "px"*/
}
/** 调用主题后回调*/
Jrwap.initTemplateCallback = function() {
    var c = Jrwap.getPreviewDocument(),
    a = c.querySelectorAll("#webModuleContainer .productSwipe");
    for (var b = 0; b < a.length; b++) {
        if (a[b].id) {
        	Jrwap.getPreviewWindow().Jrwap.initProductSwipe1(a[b].id)
        }
    }
};

/** 初始化产品滑动效果*/
Jrwap.initProductSwipe1 = function(d) {
    var c = Jrwap.getJQMobi();
    var b = Jrwap.getPreviewObject(d);
    if (!b) {
        return
    }
    c("#" + d).swipehandle(b, {
        auto: false,
        continuous: false,
        bulletsClick: true,
        callback: function(f) {
            var e = a.length;
            while (e--) {
                a[e].className = " "
            }
            if (!a[f]) {
                a[f - a.length].className = "on"
            } else {
                a[f].className = "on"
            }
        }
    });
    if (!b.querySelector(".bullets")) {
        return
    }
    var a = b.querySelector(".bullets").getElementsByTagName("li")
};

Jrwap.removeAllSwipeMenuClass = function() {
    a("moveAnimation");
    a("moveRight");
    jQuery("#navbar").removeClass("open");
    jQuery("#navButton").removeClass("navButtonOpen");
    function a(b) {
        jQuery("#webHeaderBox").removeClass(b);
        jQuery("#webBannerBox").removeClass(b);
        if(jQuery("#webProductSearchBox").length>0){
        	jQuery("#webProductSearchBox").removeClass(b);
        }
        jQuery("#webContainerBox").removeClass(b);
        jQuery("#customerServiceDiv").removeClass(b);
        jQuery("#webFooter").removeClass(b)
    }
};

Jrwap.saveDesignToCheckUpRedirectUrl = function(a, c, b) {
    if (a != null) {
        if (a == "javascript:;") {
            JRF.top.location.reload()
        } else {
            a = (a[0] !== "/" && a.indexOf("/") === -1 ? "/" + a : a);
            $("#mobiReviewPageFrame").attr("src", a)
        } if (c != null) {
            if (b && Object.prototype.toString.call(b) === "[object Function]") {
                b(c)
            }
        }
    }
};

/** 导航样式及效果
 * 1 向右滑出、2向下滑出、3向左滑出、4向上滑出
 * 1[11 向右、12 向下] 左上动画 ，2[23 向左、22向下] 右上动画，3[31] 横幅上，4[41] 横幅下，5[51 向右、54向上] 左下
 * * */
Jrwap.initNavEffect = function(){
	
	/** 滑动样式效果*/
	var _move =  function(o){
		$(o).parent().toggleClass('open');
	}
	
	/** 左滑样式效果*/
	var _moveLeft = function(o){
		if($(o).parent().hasClass("open")){
			$(o).parent().removeClass('open');
			$("#web_banner").removeClass("moveLeft");
			$("#web_main_content").removeClass("moveLeft");
			$("#web_content").removeClass("moveLeft");
			$("#web_footer").removeClass("moveLeft");
			$("#survey_content").removeClass("moveLeft");
			$(".web_bg").hide();
            $("#bodyDesign").css("overflow-y","auto");
		}else{
			$(o).parent().addClass('open');
			$("#web_banner").addClass("moveLeft");
			$("#web_main_content").addClass("moveLeft");
			$("#web_content").addClass("moveLeft");
			$("#web_footer").addClass("moveLeft");
			$("#survey_content").addClass("moveLeft");
			$(".web_bg").show();
            $("#bodyDesign").css("overflow-y","auto");
		}
	}
	
	var _moveBgLeft = function(o){
		$("#buttonnav").parent().removeClass('open');
		$(o).parent().removeClass('open');
		$("#web_banner").removeClass("moveLeft");
		$("#web_main_content").removeClass("moveLeft");
		$("#web_content").removeClass("moveLeft");
		$("#web_footer").removeClass("moveLeft");
		$("#survey_content").removeClass("moveLeft");
		$(".web_bg").hide();
	}
	
	/** 右滑样式效果*/
	var _moveRight = function(o){
		if($(o).parent().hasClass("open")){
			$(o).parent().removeClass('open');
			$("#web_banner").removeClass("moveRight");
			$("#web_main_content").removeClass("moveRight");
			$("#web_content").removeClass("moveRight");
			$("#web_footer").removeClass("moveRight");
			$("#survey_content").removeClass("moveRight");
			$(".web_bg").hide();
            $("#bodyDesign").css("overflow-y","auto");
		}else{
			$(o).parent().addClass('open');
			$("#web_banner").addClass("moveRight");
			$("#web_main_content").addClass("moveRight");
			$("#web_content").addClass("moveRight");
			$("#web_footer").addClass("moveRight");
			$("#survey_content").addClass("moveRight");
			$(".web_bg").show();
            $("#bodyDesign").css("overflow-y","hidden");
		}
	}
	
	var _moveBgRight = function (o){
		$("#buttonnav").parent().removeClass('open');
		$(o).parent().removeClass('open');
		$("#web_banner").removeClass("moveRight");
		$("#web_main_content").removeClass("moveRight");
		$("#web_content").removeClass("moveRight");
		$("#web_footer").removeClass("moveRight");
		$("#survey_content").removeClass("moveRight");
		$(".web_bg").hide();
	}
	
	$("#buttonnav").click(function(){
        $("#navbar").scrollTop(0);
		var _self = this;
		if(JRF.top._templateNavLayout==1){
			//左上
			if(JRF.top._templateNavAnimat==11){
				//向右滑动
				_moveRight(_self);
			}else if(JRF.top._templateNavAnimat==12){
				//向下滑动
				_move(_self);
			}
		}else if(JRF.top._templateNavLayout==2){
			//右上
			if(JRF.top._templateNavAnimat==22){
				//向下滑动
				_move(_self);
			}else if(JRF.top._templateNavAnimat==23){
				//向左滑动
				_moveLeft(_self);
			}
		}else if(JRF.top._templateNavLayout==5){
			//左下
			if(JRF.top._templateNavAnimat==51){
				//向右滑
				_moveRight(_self);
			}else if(JRF.top._templateNavAnimat==54){
				//向上的滑动
				_move(_self);
			}
		}

	});

    $(".web_bg").on('touchstart',function(){
        var _self = this;
        if(JRF.top._templateNavLayout==1){
            //左上
            if(JRF.top._templateNavAnimat==11){
                //向右滑动
                _moveBgRight(_self);
            }
        }else if(JRF.top._templateNavLayout==2){
            //右上
            if(JRF.top._templateNavAnimat==23){
                //向左滑动
                _moveBgLeft(_self);
            }
        }else if(JRF.top._templateNavLayout==5){
            //左下
            if(JRF.top._templateNavAnimat==51){
                //向右滑
                _moveBgRight(_self);
            }
        }
    });
}

/** 样式效果*/
Jrwap.initNavEffectStyle = function(navLayout,navAnimat,w){
	/** 追加横幅上样式*/
	var _moveAddClass = function(w){
		if(w){
			$("#navbar").addClass("swiper-container1");
			$("#nav_list").addClass("swiper-wrapper");
			$("#nav_list").children(".nav_item").addClass("swiper-container1");
		}else{
			$(Jrwap.getPreviewObject("navbar")).addClass("swiper-container1");
			$(Jrwap.getPreviewObject("nav_list")).addClass("swiper-wrapper");
			$(Jrwap.getPreviewObject("nav_list")).children(".nav_item").addClass("swiper-container1");
		}
	}
    /*//左右*/
    if(JRF.top._templateNavAnimat==11 || JRF.top._templateNavAnimat==23 || JRF.top._templateNavAnimat==54){
        $("#navbar").addClass("c-scrollright");
    }
    /*//向上
    if(JRF.top._templateNavAnimat==54){
        $("#navbar").addClass("c-scrolltop");
    }*/

	
	/** 移除横幅上样式*/
	var _moveRemoveClass = function(w){
		if(w){
			$("#navbar").removeClass("swiper-container1");
			$("#nav_list").removeClass("swiper-wrapper");
			$("#nav_list").children(".nav_item").removeClass("swiper-container1");
		}else{
			$(Jrwap.getPreviewObject("navbar")).removeClass("swiper-container1");
			$(Jrwap.getPreviewObject("nav_list")).removeClass("swiper-wrapper");
			$(Jrwap.getPreviewObject("nav_list")).children(".nav_item").removeClass("swiper-container1");
		}
	}
	
	if(navLayout==3||navLayout==4){
		/*//横幅上样式追加*/
		_moveRemoveClass(w);
	}else{
		/*//横幅上样式移除
		//_moveAddClass(w);*/
	}
	
}

Jrwap.removeNavEffectCss = function(){
	$("#webnav").removeClass('open');
	$("#web_banner").removeClass("moveLeft");
	$("#web_main_content").removeClass("moveLeft");
	$("#web_content").removeClass("moveLeft");
	$("#web_footer").removeClass("moveLeft");
	$("#survey_content").removeClass("moveLeft");
	$("#web_banner").removeClass("moveRight");
	$("#web_main_content").removeClass("moveRight");
	$("#web_content").removeClass("moveRight");
	$("#web_footer").removeClass("moveRight");
	$("#survey_content").removeClass("moveRight");
	$(".web_bg").hide();
	$("#bodyDesign").css("overflow-y","auto");
}

Jrwap.showMobileBottom = function(){
	$.getJSON('getBootomService.jsp',function(data){
		var html = new Array();
		if(data.phone && data.phone.phoneInfo.length>0){
            var html = '<div id="mobileBottomInfo" class="popup_overlay"></div><div  class="formDialog c-servemobi c-tipwindow fileDownPw">'+
        '<a class="formX "  hidefocus="true" href="javascript:;" onclick="cancelMobileBottomInfo()"></a>'+
        '<div id="popup_content" class="c-tipcontent c-telconsue">'+
        '<div class="uitip_img"></div>'+
        '<div class="alert">';
			var length = data.phone.phoneInfo;
			for (i in data.phone.phoneInfo){
                html=html+ '<div class="c-telitem"><span>'+data.phone.phoneInfo[i].name+'：</span><a href="tel:'+data.phone.phoneInfo[i].number+'">'+data.phone.phoneInfo[i].number+'</a></div>'
			}
           html =  html+'</div> </div> </div> <div class="mobibg"></div>';
		}
        $("body").append(html);
	});


}

Jrwap.showMsgBottom = function(){
	$.getJSON('getBootomService.jsp',function(data){
		var html = new Array();
		if(data.sms){
            var html = '<div id="msgBottomInfo" class="popup_overlay"></div><div  class="formDialog c-tipwindow c-servemobi fileDownPw">'+
                '<a class="formX "  hidefocus="true" href="javascript:;" onclick="cancelMsgBottomInfo();"></a>'+
                '<div id="popup_content" class="c-tipcontent c-telconsue">'+
                '<div class="uitip_img"></div>'+
                '<div class="alert">';
            html = html +'<i></i>'+data.sms.fName+'<a href="sms:'+data.sms.number+'">'+data.sms.number+'</a>';
            html =  html+'</div> </div> </div> <div class="mobibg"></div>';
            $("body").append(html);
        }
	});
}

/*//获取手机内容区高度*/
Jrwap.getMobiContentHeight = function(){
	var web_header_height = $("#web_header").height();
	var web_banner_height = $("#web_banner").height();
	var bottomWebnav_height = 0;
	if($("#bottomWebnav").length>0){
		bottomWebnav_height = $("#web_botton_service").height();
	}
	var web_footer_height = $("#web_footer").height();

	var web_botton_service_height = $("#web_botton_service").height();
	
	var screen_height= $("#bodyDesign").height();
	
	var content_height = screen_height-web_header_height-web_banner_height-bottomWebnav_height-web_botton_service_height-web_footer_height;
	
	return content_height;
}

function cancelMobileBottomInfo(){
    $('#mobileBottomInfo').remove()
}

function cancelMsgBottomInfo(){
    $('#msgBottomInfo').remove()
}

//-------------------------添加 cookie begin--------------------
function addCookie(objName,objValue,objday){//添加cookie
    var str = objName + "=" + escape(objValue);
    if(objday > 0){//为0时不设定过期时间，浏览器关闭时cookie自动消失
        var date = new Date();
        var ms = objday*24*3600*1000;
        date.setTime(date.getTime() + ms);
        str += "; expires=" + date.toGMTString();
    }
    document.cookie = str;
}
//-------------------------添加cookie end  --------------------

//-------------------------查询cookie begin --------------------
function allCookie(){//读取所有保存的cookie字符串
    var str = document.cookie;
    if(str == ""){
        str = "noData";
    }
    return str;
}
//-------------------------查询cookie end -----------------------
//-------------------------遍历cookie begin ---------------------
function findCookie(objName){
    var aCookie = document.cookie.split(";");
    var value_arr = new Array;
    for (var i = 0; i < aCookie.length; i++) {
        var aCrumb = aCookie[i].split("=");
        if($.trim(aCrumb[0].toString())==objName){
            return aCrumb[1].toString();
        }else{
            continue;
        }
    }
    return '0';
}
//-------------------------遍历cookie end  ----------------------
/**手机横幅
 * curAnimate 动画类型
 * playTime 播放时间
 * speed 切换速度
 * **/
Jrwap.initHeadBannerFn = function(curAnimate,playTime,speed){
    var mySwiper;
    var loopFlg = false;
    if(!JRF.top._isOpenDesign){
        //非设计模式开启循环
        loopFlg = {
            delay: playTime*1000,
            disableOnInteraction: false
        };
    }
    if(!speed){
        speed = parseInt(1);
    }else{
        speed = parseInt(speed);
    }
    if(!playTime){
        playTime = parseInt(3);
    }else{
        playTime = parseInt(playTime);
    }
    var num=$("#web_banner_ul .swiper-slide").length;
    var width = $("#web_banner").width();
    var height = width*0.5;
    if(num>0){
        var pagination= num>1? '.swiper-pagination':null;
        var autoplay= num>1? {delay: playTime*1000, disableOnInteraction: false}:false;
        if(curAnimate == 0 || curAnimate ==""){
            mySwiper = new Swiper ('#web_banner', {
                autoplay: autoplay,
                speed:speed*1000,
                simulateTouch : false,
                pagination: {
                    el: '.swiper-pagination',
                    clickable :true
                },
                observer:true,//自动初始化swiper
                observeParents:true,//自动初始化swiper
                loop: loopFlg
            });
            return mySwiper;
        }else if(curAnimate == 1 || curAnimate =="1") {	//水平滑动
            mySwiper = new Swiper('#web_banner', {
                loop: loopFlg,
                speed: speed*1000,
                autoplay: autoplay,
                pagination: {
                    el: '.sliderBox .swiper-pagination',
                    clickable :true
                },
                observer:true,//自动初始化swiper
                effect:"slide"
            });
        }else if(curAnimate == 2 || curAnimate =="2") {	//垂直滑动
            $("#web_banner").height(height);
            mySwiper = new Swiper('#web_banner', {
                loop: loopFlg,
                speed: speed*1000,
                autoplay: autoplay,
                pagination: {
                    el: '.sliderBox .swiper-pagination',
                    clickable :true
                },
                effect:"slide",
                direction:"vertical"
            });
        }else if(curAnimate == 3 || curAnimate =="3") {	//水平翻转
            mySwiper = new Swiper('#web_banner', {
                loop: loopFlg,
                speed: speed * 1000,
                autoplay: autoplay,
                pagination: {
                    el: '.sliderBox .swiper-pagination',
                    clickable: true
                },
                observer:true,//自动初始化swiper
                effect: "flip"
            });
        }else if(curAnimate == 4 || curAnimate =="4"){	//垂直翻转
            $("#web_banner").height(height);
            mySwiper = new Swiper('#web_banner', {
                loop: loopFlg,
                speed: speed * 1000,
                autoplay: autoplay,
                pagination: {
                    el: '.sliderBox .swiper-pagination',
                    clickable: true
                },
                observer:true,//自动初始化swiper
                effect: "flip",
                direction: "vertical"
            });
        }else if(curAnimate == 5 || curAnimate =="5" ){	//3D水平翻转
            mySwiper = new Swiper('#web_banner', {
                loop: loopFlg,
                speed: speed * 1000,
                autoplay: autoplay,
                observer:true,//自动初始化swiper
                pagination: {
                    el: '.sliderBox .swiper-pagination',
                    clickable: true
                },
                effect: "cube",
                cube: {
                    slideShadows: false,
                    shadow: false,
                    shadowOffset: 0,
                    shadowScale: 0
                }
            });
        }else if(curAnimate == 6 || curAnimate =="6" ){	//3D垂直翻转
            $("#web_banner").height(height);
            mySwiper = new Swiper('#web_banner', {
                loop: loopFlg,
                speed: speed * 1000,
                autoplay: autoplay,
                observer:true,//自动初始化swiper
                pagination: {
                    el: '.sliderBox .swiper-pagination',
                    clickable: true
                },
                effect: "cube",
                direction: "vertical",
                cube: {
                    slideShadows: false,
                    shadow: false,
                    shadowOffset: 0,
                    shadowScale: 0
                }
            });
        }
    }
    return mySwiper;
}

Jrwap.initImgShapeShow = function(mcId){
    var shapetype =  $("#jvForm"+mcId).find("input[name=attr_shapetype]").val();
    var radiustext =  $("#jvForm"+mcId).find("input[name=attr_radius]").val();
    var width = $("#jvForm"+mcId).find("input[name=attr_imageWidth]").val();
    var height = $("#jvForm"+mcId).find("input[name=attr_imageHeight]").val();
    Jrwap.imgShapeShow($("#module"+mcId).find(".picture_shadebox"),shapetype,width,height,radiustext);
}
/**
 * 20180109 mxs 图片形状初始化
 * @param c picture_shadebox div元素
 * @param shapetype
 * @param imgWidth
 * @param imgHeight
 * @param radiustext
 */
Jrwap.imgShapeShow = function (c, shapetype, imgWidth, imgHeight, radiustext) {
    //获取可显示区域宽
    var clientWidth = c.parent().parent().width();
    if(typeof shapetype == "undefined" || shapetype == ""){
    	return;
    }
    imgWidth = parseInt(imgWidth);
    imgHeight = parseInt(imgHeight);
    if(clientWidth<imgWidth){
        imgWidth = clientWidth;
    }
    c.parent().parent().css({
        "height": "100%",
        "width": "100%"
    });
    if (shapetype == 0) {
        //圆形
        if (imgWidth >= imgHeight) {
            c.css({
                "border-radius": "50%",
                "overflow": "hidden",
                "box-sizing": "border-box",
                "width": imgHeight,
                "height": imgHeight,
                "margin":"0 auto"
            });
        } else {
            c.css({
                "border-radius": "50%",
                "overflow": "hidden",
                "box-sizing": "border-box",
                "height": imgWidth,
                "width": imgWidth,
                "margin":"0 auto"
            });
        }
        c.find(".pic_shape").css({
                "-webkit-mask-box-image": "none",
                "background-size": "100% 100%"
            });
        c.find("img").css("height", "100%");
        c.find("img").css("width", "100%");
        c.parent().parent().css({
            "height":'100%',
            "width":'100%'
        });
    } else if (shapetype == 1) {
        //正方形
        c.css({
            "border-radius": 0,
            "box-sizing": "border-box",
            "overflow": "hidden",
                "margin":"0 auto"
        });
        if (imgWidth > imgHeight) {
            c.css("width", imgHeight);
            c.css("height", imgHeight);
        } else if (imgWidth < imgHeight) {
            c.css("height", imgWidth);
            c.css("width", imgWidth);
        }
        c.find(".pic_shape").css({
                "-webkit-mask-box-image": "none",
                "background-size": "100% 100%"
            });
        c.find("img").css("height", "100%");
        c.find("img").css("width", "100%");
        c.parent().parent().css({
            "height":'100%',
            "width":'100%'
        });
    } else if (shapetype == 2) {
        //长方形
        c.css({
            "border-radius": 0,
            "overflow": "hidden",
            "box-sizing": "border-box",
            "width": "100%"
        });
        c.find(".pic_shape").css({
                "-webkit-mask-box-image": "none",
                "background-size": "100% 100%"
            });
        /*if (imgWidth <= imgHeight) {
            c.css("height", imgWidth / 2);
        } else if ((imgWidth - imgHeight) / imgWidth < 0.1) {
            c.css("height", imgWidth / 2);
        } else {
            c.css("height", '100%');
        }*/
        c.find("img").css("height", "auto");
        c.find("img").css("width", "100%");

    } else if (shapetype == 3) {
        c.css({
            "width": "100%",
            "height": "100%",
            "overflow": "hidden",
            "box-sizing": "border-box",
            "border-radius": radiustext + "px"
        });
        c.find(".pic_shape").css({
                "-webkit-mask-box-image": "none",
                "background-size": "100% 100%"
            });
    }else{
        shapetype++;
        c.css({
            "width": "100%",
            "overflow": "hidden",
            "box-sizing": "border-box",
            "border-radius":"0"
        });
        c.find(".pic_shape").css({
            "-webkit-mask-box-image": "url(/jrfr/image/shape/mobishape"+shapetype+".png)",
            "background-size": "100% 100%"
        });
        c.find("img").css("max-height","100%");
    }
}

/***在线服务宽度计算**/
Jrwap.initOnlineServiceWidth = function(){
    var len = $("#customerServiceDiv").children(":visible").length;
    $("#customerServiceDiv").children(":visible").each(function(){
        $(this).css("width", 100 / len + "%");
    });
}
//刷新编辑模块
Jrwap.refreshModuleSurvey = function (back) {
    if (back) {
        Jrwap.resultModuleDefault(back.mcId, "");
    }
}

/**
 * 替换伪浏览窗口的请求路径
 * */
Jrwap.changeNavigatorUrl = function (a) {
    var b = JRF.top.$("#navigatorUrlInput");
    if (b.length > 0) {
        a = a.replace(JRF.top._siteDomain, "");
        if (a.indexOf("_safeMode=false&") > -1) {
            a = a.replace("_safeMode=false&", "")
        } else {
            if (a.indexOf("?_safeMode=false") > -1) {
                a = a.replace("?_safeMode=false", "")
            } else {
                if (a.indexOf("&_safeMode=false") > -1) {
                    a = a.replace("&_safeMode=false", "")
                }
            }
        }
        var c = JRF.top._visitorHostName + a;
        if (Jrwap.getPreviewObject("web_splash")) {
            c = c.replace("index.jsp", "")
        }
        b.val(c);
        return a
    }
};

Jrwap.html_encode = function(str){
    var s = "";
    if (str.length == 0) return "";
    s = str.replace(/&/g, "&amp;");
    s = s.replace(/</g, "&lt;");
    s = s.replace(/>/g, "&gt;");
    s = s.replace(/\'/g, "&#39;");
    s = s.replace(/\"/g, "&quot;");
    s = s.replace(/\n/g, "<br/>");
    return s;
}

Jrwap.html_decode= function(str){
    var s = "";
    if (str.length == 0) return "";
    s = str.replace(/&amp;/g, "&");
    s = s.replace(/&lt;/g, "<");
    s = s.replace(/&gt;/g, ">");
    s = s.replace(/&#39;/g, "\'");
    s = s.replace(/&quot;/g, "\"");
    s = s.replace(/<br\/>/g, "\n");
    return s;
}

/**
 * 语言切换
 * */
Jrwap.switchoverLanguage = function(domain){
    if(!(top.Jrwap.checkSaveBar())){
        if (window === window.top) {
            //正常
            window.location.href = document.location.protocol+"//"+domain+"/mIndex.jsp";
        }else{
            //嵌入页面
            top.window.location.href = document.location.protocol+"//"+domain+top.window.location.pathname+top.window.location.search;
        }
    }
}
/** 网站设计提示
 * b 回调函数
 * a true or false
 * */
Jrwap.checkSaveBar = function (b, a,href) {
    if (JRF.top._changeStyleNum > 0) {
        Jrwap.popupStyleChangeBodyWindow("您的网站设计已经更改，是否立即保存？", b, a,href);
        return true
    }
    return false
};
Jrwap.checkSaveBeforePopupWindow = function(a) {
    var b = {};
    b.funRun = true;
    b.fun = Jrwap.styleRecover;
    b.args = new Array();
    if (Jrwap.checkSaveBar(b, true)) {
        return false
    }
    a && Jrwap.popupWindow(a)
};
/***初始化多语言***/
Jrwap.initMultiLanguage = function () {
    $('#bodyDesign').hover(function () {
        },
        function () {
            $("#lanSelect").hide()
        });
    $(".lanItem").click(function () {
        var b = JRF.top.document.location.href;
        var a = b.split("/")[2];
        var c = $(this).attr("value").split("/index.jsp")[0];
        JRF.top.document.location.href = JRF.curr_protocol+"//" + a + c + "/manage/mobiDesign.jsp"
    })
};
/**
 * 模块浮动初始化
 * */
Jrwap.moduleInitFolat = function(mcId){
    if(mcId){
        var moduleObj = $("#module"+mcId);
        var float = moduleObj.attr("is_float");
        var modulecode = moduleObj.attr("_modulecode");
        if(typeof(float)!= undefined && float==1){
            var left = moduleObj.find("input[name='attr_floatLeft']").val();
            var top = moduleObj.find("input[name='attr_floatTop']").val()
            $(moduleObj).css({"position":"absolute","left":left+"%","top":top+"px"});
      		
        }
    }else{
        $("#web_main_content").find("div[_modulecode][is_float='1']").each(function(i,o){
            var mcId = $(o).attr("_mcid");
            var moduleObj = $("#module"+mcId);
            var left = moduleObj.find("input[name='attr_floatLeft']").val();
            var top = moduleObj.find("input[name='attr_floatTop']").val()
            $(moduleObj).css({"position":"absolute","left":left+"%","top":top+"px"});
        });
    }
}

/** 显示全屏*/
Jrwap.showFullscreen = function(){
	var docElm = document.documentElement;
    if (docElm.requestFullscreen) {
    	//W3C 
        docElm.requestFullscreen();
    }else if (docElm.mozRequestFullScreen) {
    	//FireFox 
        docElm.mozRequestFullScreen();
    }else if (docElm.webkitRequestFullScreen) {
    	//Chrome等 
        docElm.webkitRequestFullScreen();
    }else if (elem.msRequestFullscreen) {
    	//IE11 
        elem.msRequestFullscreen();
    }
}

/** 隐藏全屏*/
Jrwap.hideFullscreen = function(){
	if (document.exitFullscreen) {
        document.exitFullscreen();
    }else if (document.mozCancelFullScreen) {
        document.mozCancelFullScreen();
    }else if (document.webkitCancelFullScreen) {
        document.webkitCancelFullScreen();
    }else if (document.msExitFullscreen) {
        document.msExitFullscreen();
    }
}

/**
 * 设置 iframe 高度
 * */
Jrwap.setIframeHeight = function(iframe){
	if (iframe) {
		var iframeWin = iframe.contentWindow || iframe.contentDocument.parentWindow;
		if (iframeWin.document.body) {
			iframe.height = iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight;
		}
	}
};

Jrwap.refreshModuleByVisitor = function (mcId, html) {
    var b = $("#module" + mcId);
    var c = b.attr("_autoheight");
    if (c > 0) {
        b.css("height", "auto");
    }
    b.empty().attr("id","");
    b.before(html);
    b.remove();
    Jrwap.AllShowTopForBottom();
};